mirror of
https://github.com/home-assistant/core.git
synced 2026-04-25 20:55:40 +00:00
Unsubscribe from listeners when removing integration sensor (#69235)
This commit is contained in:
committed by
Franck Nijhof
parent
a3ad44f7b6
commit
9ec9dc047b
@@ -253,8 +253,10 @@ class IntegrationSensor(RestoreEntity, SensorEntity):
|
||||
self._state = integral
|
||||
self.async_write_ha_state()
|
||||
|
||||
async_track_state_change_event(
|
||||
self.hass, [self._sensor_source_id], calc_integration
|
||||
self.async_on_remove(
|
||||
async_track_state_change_event(
|
||||
self.hass, [self._sensor_source_id], calc_integration
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user