Skip to content

Commit a58a706

Browse files
authored
Remove redudant state write in Smart Meter Texas (home-assistant#154126)
1 parent 0c9b72b commit a58a706

File tree

1 file changed

+1
-2
lines changed
  • homeassistant/components/smart_meter_texas

1 file changed

+1
-2
lines changed

homeassistant/components/smart_meter_texas/sensor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def extra_state_attributes(self):
6767
}
6868

6969
@callback
70-
def _state_update(self):
70+
def _handle_coordinator_update(self) -> None:
7171
"""Call when the coordinator has an update."""
7272
self._attr_available = self.coordinator.last_update_success
7373
if self._attr_available:
@@ -77,7 +77,6 @@ def _state_update(self):
7777
async def async_added_to_hass(self) -> None:
7878
"""Subscribe to updates."""
7979
await super().async_added_to_hass()
80-
self.async_on_remove(self.coordinator.async_add_listener(self._state_update))
8180

8281
# If the background update finished before
8382
# we added the entity, there is no need to restore

0 commit comments

Comments
 (0)