Skip to content

Commit

Permalink
Clear zones list before appending
Browse files Browse the repository at this point in the history
  • Loading branch information
peroo committed Dec 3, 2024
1 parent 9a38b68 commit be2c213
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pytouchlinesl/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ async def zones(self, *, include_off: bool = False, refresh: bool = False) -> li
"""
data = await self._data(refresh=refresh)

self._zones = []
for z in data.zones.elements:
schedule = await self.schedule_by_idx(z.mode.schedule_index)
zone = Zone(module=self, client=self._client, zone_data=z, schedule=schedule)
Expand Down

0 comments on commit be2c213

Please sign in to comment.