From 967492642ebae278cd5f4d373b1ed205142a9a50 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 1 Aug 2023 10:34:41 +0800 Subject: [PATCH] Add load and save configs --- pytec/tec_qt.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 417740d..a19eadc 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -331,7 +331,19 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.thermostat_menu.addAction(self.actionEnter_DFU_Mode) self.thermostat_menu.addAction(self.actionNetwork_Settings) + + @asyncSlot(bool) + async def load(_): + await self.client.load_config() + + self.actionLoad_all_configs.triggered.connect(load) self.thermostat_menu.addAction(self.actionLoad_all_configs) + + @asyncSlot(bool) + async def save(_): + await self.client.save_config() + + self.actionSave_all_configs.triggered.connect(save) self.thermostat_menu.addAction(self.actionSave_all_configs) def about_thermostat():