Skip to content

Commit 0089a5b

Browse files
committed
Move as suggested
1 parent 714cd08 commit 0089a5b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

custom_components/plugwise/climate.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,7 @@ def __init__(
123123

124124
gateway_id: str = coordinator.api.gateway_id
125125
self._gateway_data = coordinator.data[gateway_id]
126-
schedule = self.device.get("select_schedule")
127-
if schedule is not None and (schedule != NONE or schedule != "off"):
128-
self._last_active_schedule = schedule
129126
self._homekit_enabled = homekit_enabled # pw-beta homekit emulation
130-
131127
self._location = device_id
132128
if (location := self.device.get(LOCATION)) is not None:
133129
self._location = location
@@ -230,6 +226,9 @@ def hvac_modes(self) -> list[HVACMode]:
230226

231227
if self.device.get(AVAILABLE_SCHEDULES, []):
232228
hvac_modes.append(HVACMode.AUTO)
229+
schedule = self.device.get("select_schedule")
230+
if schedule is not None and (schedule != NONE or schedule != "off"):
231+
self._last_active_schedule = schedule
233232

234233
if self.coordinator.api.cooling_present:
235234
if REGULATION_MODES in self._gateway_data:

0 commit comments

Comments
 (0)