From dad1184e180a8a7a4d3ac637420d3008e7ca156d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 25 Feb 2024 03:37:09 -1000 Subject: [PATCH] Make hardware setup in hassio a normal function (#111328) nothing awaited hassio --- homeassistant/components/hassio/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index 1472843e14d..78b55e0e4af 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -590,8 +590,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: await async_setup_addon_panel(hass, hassio) # Setup hardware integration for the detected board type - async def _async_setup_hardware_integration(_: datetime | None = None) -> None: - """Set up hardaware integration for the detected board type.""" + @callback + def _async_setup_hardware_integration(_: datetime | None = None) -> None: + """Set up hardware 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_call_later( @@ -614,7 +615,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: _async_setup_hardware_integration, cancel_on_shutdown=True ) - await _async_setup_hardware_integration() + _async_setup_hardware_integration() hass.async_create_task( hass.config_entries.flow.async_init(DOMAIN, context={"source": "system"})