From bc417162cf264a5561555f3ce74ad7bdb9bbca69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 11 Aug 2021 12:50:17 +0300 Subject: [PATCH] Fix Huawei LTE entity state updating (#54447) Since 91a2b96, we no longer key this by the router URL, but the relevant config entry unique id. Closes https://github.com/home-assistant/core/issues/54243 --- homeassistant/components/huawei_lte/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/huawei_lte/__init__.py b/homeassistant/components/huawei_lte/__init__.py index 81b715b71fe..0c545486c82 100644 --- a/homeassistant/components/huawei_lte/__init__.py +++ b/homeassistant/components/huawei_lte/__init__.py @@ -665,9 +665,9 @@ class HuaweiLteBaseEntity(Entity): async_dispatcher_connect(self.hass, UPDATE_SIGNAL, self._async_maybe_update) ) - async def _async_maybe_update(self, url: str) -> None: + async def _async_maybe_update(self, config_entry_unique_id: str) -> None: """Update state if the update signal comes from our router.""" - if url == self.router.url: + if config_entry_unique_id == self.router.config_entry.unique_id: self.async_schedule_update_ha_state(True) async def async_will_remove_from_hass(self) -> None: