File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -330,15 +330,14 @@ def _get_schedule_states_with_off(
330330
331331 Also, replace NONE by OFF when none of the schedules are active.
332332 """
333+ all_off = True
333334 self ._schedule_old_states [location ] = {}
334335 for schedule in schedules :
335336 active : bool = schedule == selected and data ["climate_mode" ] == "auto"
336- self ._schedule_old_states [location ][schedule ] = "on" if active else "off"
337-
338- all_off = True
339- for state in self ._schedule_old_states [location ].values ():
340- if state == "on" :
337+ self ._schedule_old_states [location ][schedule ] = "off"
338+ if active :
339+ self ._schedule_old_states [location ][schedule ] = "on"
341340 all_off = False
342- break
341+
343342 if all_off :
344343 data ["select_schedule" ] = OFF
You can’t perform that action at this time.
0 commit comments