mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Unsubscribe from listeners when removing threshold binary sensor (#69236)
This commit is contained in:
parent
9231819532
commit
e4b148458b
@ -151,8 +151,10 @@ class ThresholdSensor(BinarySensorEntity):
|
|||||||
_update_sensor_state()
|
_update_sensor_state()
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async_track_state_change_event(
|
self.async_on_remove(
|
||||||
hass, [entity_id], async_threshold_sensor_state_listener
|
async_track_state_change_event(
|
||||||
|
hass, [entity_id], async_threshold_sensor_state_listener
|
||||||
|
)
|
||||||
)
|
)
|
||||||
_update_sensor_state()
|
_update_sensor_state()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user