From a58a7065b690bb1ec6eb3ca37fa22605d99acc2b Mon Sep 17 00:00:00 2001 From: srirams <638940+srirams@users.noreply.github.com> Date: Sat, 11 Oct 2025 03:32:10 -0500 Subject: [PATCH] Remove redudant state write in Smart Meter Texas (#154126) --- homeassistant/components/smart_meter_texas/sensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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