Skip to content

Commit a3a9fb2

Browse files
committed
simplify call track event
1 parent a146082 commit a3a9fb2

File tree

1 file changed

+5
-6
lines changed
  • custom_components/battery_consumption

1 file changed

+5
-6
lines changed

custom_components/battery_consumption/sensor.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,13 @@ async def async_added_to_hass(self):
135135
)
136136

137137
# listen to source ID
138-
self.async_on_remove(
139-
async_track_state_change_event(
140-
self.hass,
141-
[self._source_entity_id],
142-
self._async_battery_consumption_sensor_state_listener,
143-
)
138+
async_track_state_change_event(
139+
self.hass,
140+
[self._source_entity_id],
141+
self._async_battery_consumption_sensor_state_listener,
144142
)
145143

144+
146145
@property
147146
def unique_id(self):
148147
"""Return the unique id of this sensor."""

0 commit comments

Comments
 (0)