Fix data access in streamlabs water (#107062)

* Fix data access in streamlabs water

* Fix data access in streamlabs water
pull/107066/head^2
Joost Lekkerkerker 2024-01-04 09:13:34 +01:00 committed by GitHub
parent 85a1d8b34c
commit dd6c5e89ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class StreamlabsCoordinator(DataUpdateCoordinator[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(

View File

@ -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),