From 337b59ba23a50b80666af211b04c60a5d693eaf6 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 9 May 2023 18:42:04 +0200 Subject: [PATCH] Fix lingering timer in hassio (#92854) --- homeassistant/components/hassio/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index ada2308ebc4..c8f4b69d429 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -596,7 +596,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: # os info not yet fetched from supervisor, retry later async_track_point_in_utc_time( hass, - _async_setup_hardware_integration, + async_setup_hardware_integration_job, utcnow() + HASSIO_UPDATE_INTERVAL, ) return @@ -610,6 +610,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: ) ) + async_setup_hardware_integration_job = HassJob( + _async_setup_hardware_integration, cancel_on_shutdown=True + ) + await _async_setup_hardware_integration() hass.async_create_task(