mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Avoid creating tasks to setup ignored and disabled config entries (#110756)
* Avoid creating tasks to setup ignored and disabled config entries * lint
This commit is contained in:
@@ -370,15 +370,18 @@ async def _async_setup_component(
|
||||
# call to avoid a deadlock when forwarding platforms
|
||||
hass.config.components.add(domain)
|
||||
|
||||
await asyncio.gather(
|
||||
*(
|
||||
asyncio.create_task(
|
||||
entry.async_setup(hass, integration=integration),
|
||||
name=f"config entry setup {entry.title} {entry.domain} {entry.entry_id}",
|
||||
if entries := hass.config_entries.async_entries(
|
||||
domain, include_ignore=False, include_disabled=False
|
||||
):
|
||||
await asyncio.gather(
|
||||
*(
|
||||
asyncio.create_task(
|
||||
entry.async_setup(hass, integration=integration),
|
||||
name=f"config entry setup {entry.title} {entry.domain} {entry.entry_id}",
|
||||
)
|
||||
for entry in entries
|
||||
)
|
||||
for entry in hass.config_entries.async_entries(domain)
|
||||
)
|
||||
)
|
||||
|
||||
# Cleanup
|
||||
if domain in hass.data[DATA_SETUP]:
|
||||
|
||||
Reference in New Issue
Block a user