Fix not actually awaiting for load/save

This commit is contained in:
atse 2024-08-27 17:07:45 +08:00
parent 9910f935a9
commit df79d4d977

View File

@ -66,9 +66,9 @@ class ThermostatCtrlMenu(QtWidgets.QMenu):
self.actionnet_settings_input_diag.triggered.connect(self.net_settings_request)
self.addAction(self.actionnet_settings_input_diag)
@pyqtSlot(bool)
def load(_):
self._thermostat.load_cfg()
@asyncSlot(bool)
async def load(_):
await self._thermostat.load_cfg()
self._info_box.display_info_box(
"Config loaded", "All channel configs have been loaded from flash."
@ -78,9 +78,9 @@ class ThermostatCtrlMenu(QtWidgets.QMenu):
self.actionLoad_all_configs.triggered.connect(load)
self.addAction(self.actionLoad_all_configs)
@pyqtSlot(bool)
def save(_):
self._thermostat.save_cfg()
@asyncSlot(bool)
async def save(_):
await self._thermostat.save_cfg()
self._info_box.display_info_box(
"Config saved", "All channel configs have been saved to flash."