Fix data access in streamlabs water (#107062)
* Fix data access in streamlabs water * Fix data access in streamlabs waterpull/107066/head^2
parent
85a1d8b34c
commit
dd6c5e89ef
|
@ -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(
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue