forked from M-Labs/thermostat
Handle UI when fan_pwm is 0
This commit is contained in:
parent
ac77c457ec
commit
9f839f4bd9
@ -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"])
|
||||
|
Loading…
Reference in New Issue
Block a user