From 739eeeccb0ae20b6717c6623bfb95fc63cdf1973 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 28 Aug 2023 10:21:05 -0500 Subject: [PATCH] Switch hassio to use async_call_later (#99216) --- homeassistant/components/hassio/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index 0abc484b798..3451195f3cd 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -42,7 +42,7 @@ from homeassistant.helpers import ( ) from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.device_registry import DeviceInfo -from homeassistant.helpers.event import async_track_point_in_utc_time +from homeassistant.helpers.event import async_call_later from homeassistant.helpers.storage import Store from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed @@ -535,10 +535,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: except HassioAPIError as err: _LOGGER.warning("Can't read Supervisor data: %s", err) - async_track_point_in_utc_time( + async_call_later( hass, + HASSIO_UPDATE_INTERVAL, HassJob(update_info_data, cancel_on_shutdown=True), - utcnow() + HASSIO_UPDATE_INTERVAL, ) # Fetch data @@ -610,10 +610,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: """Set up hardaware integration for the detected board type.""" if (os_info := get_os_info(hass)) is None: # os info not yet fetched from supervisor, retry later - async_track_point_in_utc_time( + async_call_later( hass, + HASSIO_UPDATE_INTERVAL, async_setup_hardware_integration_job, - utcnow() + HASSIO_UPDATE_INTERVAL, ) return if (board := os_info.get("board")) is None: