mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Unsubscribe from listeners when removing integration sensor (#69235)
This commit is contained in:
parent
f98b3e44de
commit
c79b361927
@ -253,8 +253,10 @@ class IntegrationSensor(RestoreEntity, SensorEntity):
|
|||||||
self._state = integral
|
self._state = integral
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async_track_state_change_event(
|
self.async_on_remove(
|
||||||
self.hass, [self._sensor_source_id], calc_integration
|
async_track_state_change_event(
|
||||||
|
self.hass, [self._sensor_source_id], calc_integration
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user