Add load and save configs

This commit is contained in:
atse 2023-08-01 10:34:41 +08:00
parent bfec9efbec
commit 967492642e

View File

@ -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():