From df79d4d97765dd8a98fd63e7fc4517d2c5051970 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 27 Aug 2024 17:07:45 +0800 Subject: [PATCH] Fix not actually awaiting for load/save --- pytec/pytec/gui/view/thermostat_ctrl_menu.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pytec/pytec/gui/view/thermostat_ctrl_menu.py b/pytec/pytec/gui/view/thermostat_ctrl_menu.py index 162f97b..f264b9f 100644 --- a/pytec/pytec/gui/view/thermostat_ctrl_menu.py +++ b/pytec/pytec/gui/view/thermostat_ctrl_menu.py @@ -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."