forked from home-assistant/core
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
This commit is contained in:
committed by
Paulus Schoutsen
parent
7d67caba44
commit
72e548de5f
@@ -665,9 +665,9 @@ class HuaweiLteBaseEntity(Entity):
|
|||||||
async_dispatcher_connect(self.hass, UPDATE_SIGNAL, self._async_maybe_update)
|
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."""
|
"""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)
|
self.async_schedule_update_ha_state(True)
|
||||||
|
|
||||||
async def async_will_remove_from_hass(self) -> None:
|
async def async_will_remove_from_hass(self) -> None:
|
||||||
|
Reference in New Issue
Block a user