diff --git a/homeassistant/components/stt/__init__.py b/homeassistant/components/stt/__init__.py index c3d39d4337e..676d8b8aa76 100644 --- a/homeassistant/components/stt/__init__.py +++ b/homeassistant/components/stt/__init__.py @@ -3,7 +3,6 @@ from __future__ import annotations from abc import abstractmethod -import asyncio from collections.abc import AsyncIterable from dataclasses import asdict import logging @@ -127,8 +126,14 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: component.register_shutdown() platform_setups = async_setup_legacy(hass, config) - if platform_setups: - await asyncio.wait([asyncio.create_task(setup) for setup in platform_setups]) + for setup in platform_setups: + # Tasks are created as tracked tasks to ensure startup + # waits for them to finish, but we explicitly do not + # want to wait for them to finish here because we want + # any config entries that use stt as a base platform + # to be able to start with out having to wait for the + # legacy platforms to finish setting up. + hass.async_create_task(setup, eager_start=True) hass.http.register_view(SpeechToTextView(hass.data[DATA_PROVIDERS])) return True