diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 7da8636b19b..279dbc57c84 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -40,6 +40,7 @@ from homeassistant.helpers.reload import async_integration_yaml_config from homeassistant.helpers.service import async_register_admin_service from homeassistant.helpers.typing import ConfigType from homeassistant.loader import async_get_integration +from homeassistant.util.async_ import create_eager_task # Loading the config flow file will register the flow from . import debug_info, discovery @@ -449,14 +450,13 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: # Forward the entry setup to the MQTT platforms await asyncio.gather( *( - [ - device_automation.async_setup_entry(hass, config_entry), - tag.async_setup_entry(hass, config_entry), - ] - + [ - hass.config_entries.async_forward_entry_setup(entry, component) - for component in PLATFORMS - ] + create_eager_task( + device_automation.async_setup_entry(hass, config_entry) + ), + create_eager_task(tag.async_setup_entry(hass, config_entry)), + create_eager_task( + hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) + ), ) ) # Setup discovery