Stop touching night mode when control_nightmode == false

This is a regression introduced in #10762
reviewable/pr11685/r1
Max Ignatenko 2 weeks ago committed by GitHub
parent 715f5aa747
commit 3ec049bae1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -512,7 +512,9 @@ function AutoWarmth:setWarmth(val, force_warmth)
-- A value > 100 means to set night mode and set warmth to maximum.
-- We use an offset of 1000 to "flag", that night mode is on.
if val then
DeviceListener:onSetNightMode(self.control_nightmode and val > 100)
if self.control_nightmode then
DeviceListener:onSetNightMode(val > 100)
end
if self.control_warmth and Device:hasNaturalLight() then
val = math.min(val, 100) -- "mask" night mode

Loading…
Cancel
Save