Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4486b4a

Browse files
committed
Proper zone_state assignment
1 parent 4ded7a4 commit 4486b4a

File tree

5 files changed

+108
-106
lines changed

5 files changed

+108
-106
lines changed

src/tadoasync/tadoasync.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ async def get_zone_states(self) -> list[ZoneStates]:
250250
zone_id: ZoneState.from_dict(zone_state_dict)
251251
for zone_id, zone_state_dict in obj["zoneStates"].items()
252252
}
253+
254+
for zone_state in zone_states.values():
255+
await self.update_zone_data(zone_state)
256+
253257
return [ZoneStates(zone_states=zone_states)]
254258

255259
async def get_zone_state(self, zone_id: int) -> ZoneState:
@@ -473,8 +477,7 @@ async def update_zone_data(self, data: ZoneState) -> None: # pylint: disable=to
473477

474478
data.current_fan_speed = None
475479
data.current_fan_level = None
476-
# If there is no overlay, the mode will always be
477-
# "SMART_SCHEDULE"
480+
# If there is no overlay, the mode will always be "SMART_SCHEDULE"
478481
data.current_hvac_mode = CONST_MODE_OFF
479482
data.current_swing_mode = CONST_MODE_OFF
480483
data.current_vertical_swing_mode = CONST_VERTICAL_SWING_OFF

0 commit comments

Comments
 (0)