From f3bae8bcbe0115b80cf8164f512ea6615d4cff01 Mon Sep 17 00:00:00 2001 From: Joostlek Date: Thu, 4 Jan 2024 08:39:02 +0100 Subject: [PATCH 1/2] Fix data access in streamlabs water --- homeassistant/components/streamlabswater/coordinator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/streamlabswater/coordinator.py b/homeassistant/components/streamlabswater/coordinator.py index a11eced5a6e5c..dc57ae78810a5 100644 --- a/homeassistant/components/streamlabswater/coordinator.py +++ b/homeassistant/components/streamlabswater/coordinator.py @@ -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( From 138c1690d006d1992771ae6cd870167029263399 Mon Sep 17 00:00:00 2001 From: Joostlek Date: Thu, 4 Jan 2024 08:40:36 +0100 Subject: [PATCH 2/2] Fix data access in streamlabs water --- homeassistant/components/streamlabswater/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/streamlabswater/sensor.py b/homeassistant/components/streamlabswater/sensor.py index 0b249b7c4e54b..6c869a6d1bc95 100644 --- a/homeassistant/components/streamlabswater/sensor.py +++ b/homeassistant/components/streamlabswater/sensor.py @@ -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),