From 9f839f4bd932bbdd6a7418fcae830b96d1a93bbe Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 11 Jul 2023 11:48:38 +0800 Subject: [PATCH] Handle UI when fan_pwm is 0 --- pytec/tec_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index be47a6c..7ac6560 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -123,7 +123,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): if fan_settings is None: return with QSignalBlocker(self.fan_power_slider): - self.fan_power_slider.setValue(fan_settings["fan_pwm"]) + self.fan_power_slider.setValue(fan_settings["fan_pwm"] or 100) # 0 = PWM off = full strength self.fan_power_slider.setEnabled(not fan_settings["auto_mode"]) with QSignalBlocker(self.fan_auto_box): self.fan_auto_box.setChecked(fan_settings["auto_mode"])