Skip to content

Commit

Permalink
Fix data access in streamlabs water (home-assistant#107062)
Browse files Browse the repository at this point in the history
* Fix data access in streamlabs water

* Fix data access in streamlabs water
  • Loading branch information
joostlek authored Jan 4, 2024
1 parent 85a1d8b commit dd6c5e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/streamlabswater/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def _async_update_data(self) -> dict[str, StreamlabsData]:
def _update_data(self) -> dict[str, StreamlabsData]:
locations = self.client.get_locations()
res = {}
for location in locations:
for location in locations["locations"]:
location_id = location["locationId"]
water_usage = self.client.get_water_usage_summary(location_id)
res[location_id] = StreamlabsData(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/streamlabswater/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def async_setup_entry(

entities = []

for location_id in coordinator.data.values():
for location_id in coordinator.data:
entities.extend(
[
StreamLabsDailyUsage(coordinator, location_id),
Expand Down

0 comments on commit dd6c5e8

Please sign in to comment.