[autowarmth, plugin] Bug if all scheduler entries are deleted (#8386)

This commit is contained in:
zwim
2021-10-28 22:13:41 +02:00
committed by GitHub
parent 0aab7d7378
commit 6aa0d802ec

View File

@@ -256,7 +256,10 @@ function AutoWarmth:scheduleWarmthChanges(time)
end
end
UIManager:unschedule(AutoWarmth.setWarmth) -- to be safe, if there are no scheduled entries
if self.activate == 0 then return end
if #self.sched_funcs == 0 then return end
-- `actual_warmth` is the value which should be applied now.
-- `next_warmth` is valid `delay_time` seconds after now for resume on some devices (KA1)