Fix lingering timer in demo geo_location (#92514)

This commit is contained in:
epenet
2023-05-04 19:02:52 +02:00
committed by GitHub
parent 887e656570
commit b6930c0f04

View File

@@ -86,7 +86,10 @@ class DemoManager:
def _init_regular_updates(self) -> None:
"""Schedule regular updates based on configured time interval."""
track_time_interval(
self._hass, lambda now: self._update(), DEFAULT_UPDATE_INTERVAL
self._hass,
lambda now: self._update(),
DEFAULT_UPDATE_INTERVAL,
cancel_on_shutdown=True,
)
def _update(self, count: int = 1) -> None: