Call async added to hass super in Smart Meter Texas (#100445)

This commit is contained in:
Joost Lekkerkerker 2023-09-26 20:01:33 +02:00 committed by GitHub
parent 9be5005a70
commit ae7ede1253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,7 @@ class SmartMeterTexasSensor(CoordinatorEntity, RestoreEntity, SensorEntity):
# pylint: disable-next=hass-missing-super-call # pylint: disable-next=hass-missing-super-call
async def async_added_to_hass(self): async def async_added_to_hass(self):
"""Subscribe to updates.""" """Subscribe to updates."""
await super().async_added_to_hass()
self.async_on_remove(self.coordinator.async_add_listener(self._state_update)) self.async_on_remove(self.coordinator.async_add_listener(self._state_update))
# If the background update finished before # If the background update finished before