Unregister listener for stats sensor with max_age (#31580)

pull/31591/head
Eugenio Panadero 2020-02-07 11:06:46 +01:00 committed by GitHub
parent 274cf23269
commit 37205f9f61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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