From f54d9292f176ae43012bcf278286df721745205a Mon Sep 17 00:00:00 2001 From: Mick Montorier-Aberman Date: Tue, 14 Jan 2025 23:34:48 +0100 Subject: [PATCH] Call _handle_coordinator_update when SwitchBot Cloud entity is added to hass --- homeassistant/components/switchbot_cloud/entity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/switchbot_cloud/entity.py b/homeassistant/components/switchbot_cloud/entity.py index f77adb7b1929f4..f20d84cc407ce7 100644 --- a/homeassistant/components/switchbot_cloud/entity.py +++ b/homeassistant/components/switchbot_cloud/entity.py @@ -48,3 +48,8 @@ async def send_api_command( command_type, parameters, ) + + async def async_added_to_hass(self) -> None: + """Run when entity is about to be added to hass.""" + await super().async_added_to_hass() + self._handle_coordinator_update()