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:
Ville Skyttä 2021-08-11 12:50:17 +03:00 committed by GitHub
parent 2f5c3c08ef
commit bc417162cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: