diff --git a/homeassistant/components/smart_meter_texas/sensor.py b/homeassistant/components/smart_meter_texas/sensor.py index 480188ab2a64..6099b489c438 100644 --- a/homeassistant/components/smart_meter_texas/sensor.py +++ b/homeassistant/components/smart_meter_texas/sensor.py @@ -67,7 +67,7 @@ class SmartMeterTexasSensor(CoordinatorEntity, RestoreEntity, SensorEntity): } @callback - def _state_update(self): + def _handle_coordinator_update(self) -> None: """Call when the coordinator has an update.""" self._attr_available = self.coordinator.last_update_success if self._attr_available: @@ -77,7 +77,6 @@ class SmartMeterTexasSensor(CoordinatorEntity, RestoreEntity, SensorEntity): async def async_added_to_hass(self) -> None: """Subscribe to updates.""" await super().async_added_to_hass() - self.async_on_remove(self.coordinator.async_add_listener(self._state_update)) # If the background update finished before # we added the entity, there is no need to restore