From 7f3e56eb582a21b4fb881f37caf62e70a771ec5c Mon Sep 17 00:00:00 2001 From: "Steven B." <51370195+sdb9696@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:17:35 +0000 Subject: [PATCH] Update tplink coordinators to update hub-attached children (#135586) --- homeassistant/components/tplink/coordinator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tplink/coordinator.py b/homeassistant/components/tplink/coordinator.py index 186840e8faf..d1b4694779d 100644 --- a/homeassistant/components/tplink/coordinator.py +++ b/homeassistant/components/tplink/coordinator.py @@ -49,6 +49,12 @@ class TPLinkDataUpdateCoordinator(DataUpdateCoordinator[None]): ) -> None: """Initialize DataUpdateCoordinator to gather data for specific SmartPlug.""" self.device = device + + # The iot HS300 allows a limited number of concurrent requests and + # fetching the emeter information requires separate ones, so child + # coordinators are created below in get_child_coordinator. + self._update_children = not isinstance(device, IotStrip) + super().__init__( hass, _LOGGER, @@ -68,7 +74,7 @@ class TPLinkDataUpdateCoordinator(DataUpdateCoordinator[None]): async def _async_update_data(self) -> None: """Fetch all device and sensor data from api.""" try: - await self.device.update(update_children=False) + await self.device.update(update_children=self._update_children) except AuthenticationError as ex: raise ConfigEntryAuthFailed( translation_domain=DOMAIN,