From 5e105884d173361217abb0f798a79592621293b5 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 11 Jul 2023 11:55:30 +0800 Subject: [PATCH] Use slider signal argument to set fan value --- pytec/tec_qt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index fe89724..2069c37 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -120,11 +120,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): with QSignalBlocker(self.fan_auto_box): self.fan_auto_box.setChecked(fan_settings["auto_mode"]) - @asyncSlot() - async def fan_set(self): + @asyncSlot(int) + async def fan_set(self, value): if self.tec_client is None or self.fan_auto_box.isChecked(): return - await self.tec_client.set_param("fan", self.fan_power_slider.value()) + await self.tec_client.set_param("fan", value) @asyncSlot(int) async def fan_auto_set(self, enabled):