Add LG ThinQ event bus listener to lifecycle hooks (#142006)

This commit is contained in:
Joost Lekkerkerker 2025-04-01 19:20:31 +02:00 committed by GitHub
parent 6007629293
commit d9cd62bf65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,10 +63,12 @@ class DeviceDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
# Add a callback to handle core config update.
self.unit_system: str | None = None
self.hass.bus.async_listen(
event_type=EVENT_CORE_CONFIG_UPDATE,
listener=self._handle_update_config,
event_filter=self.async_config_update_filter,
self.config_entry.async_on_unload(
self.hass.bus.async_listen(
event_type=EVENT_CORE_CONFIG_UPDATE,
listener=self._handle_update_config,
event_filter=self.async_config_update_filter,
)
)
async def _handle_update_config(self, _: Event) -> None: