Unregister listener for stats sensor with max_age (#31580)

This commit is contained in:
Eugenio Panadero
2020-02-07 11:06:46 +01:00
committed by GitHub
parent 274cf23269
commit 37205f9f61

View File

@@ -294,6 +294,7 @@ class StatisticsSensor(Entity):
"""Timer callback for sensor update.""" """Timer callback for sensor update."""
_LOGGER.debug("%s: executing scheduled update", self.entity_id) _LOGGER.debug("%s: executing scheduled update", self.entity_id)
self.async_schedule_update_ha_state(True) self.async_schedule_update_ha_state(True)
self._update_listener = None
self._update_listener = async_track_point_in_utc_time( self._update_listener = async_track_point_in_utc_time(
self.hass, _scheduled_update, next_to_purge_timestamp self.hass, _scheduled_update, next_to_purge_timestamp