mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Switch gios to async_on_remove (#34499)
This commit is contained in:
parent
6a4c25b668
commit
2584a07452
@ -142,11 +142,9 @@ class GiosAirQuality(AirQualityEntity):
|
||||
|
||||
async def async_added_to_hass(self):
|
||||
"""Connect to dispatcher listening for entity data notifications."""
|
||||
self.coordinator.async_add_listener(self.async_write_ha_state)
|
||||
|
||||
async def async_will_remove_from_hass(self):
|
||||
"""Disconnect from update signal."""
|
||||
self.coordinator.async_remove_listener(self.async_write_ha_state)
|
||||
self.async_on_remove(
|
||||
self.coordinator.async_add_listener(self.async_write_ha_state)
|
||||
)
|
||||
|
||||
async def async_update(self):
|
||||
"""Update GIOS entity."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user