From 145ce183d007393d96ada5138ada134865b59604 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 26 Feb 2024 18:45:55 -1000 Subject: [PATCH] Create component setup tasks eagerly in bootstrap (#111511) This saves waiting one iteration of the event loop --- homeassistant/bootstrap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 7cec74c9dce..b14b5636b59 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -622,7 +622,9 @@ async def async_setup_multi_components( domains_not_yet_setup = domains - hass.config.components futures = { domain: hass.async_create_task( - async_setup_component(hass, domain, config), f"setup component {domain}" + async_setup_component(hass, domain, config), + f"setup component {domain}", + eager_start=True, ) for domain in domains_not_yet_setup }