mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Load mailbox integration platforms in tracked tasks (#114774)
This commit is contained in:
parent
e86fec310b
commit
5394a2a34a
@ -110,14 +110,11 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
component.register_shutdown()
|
||||
await component.async_add_entities([mailbox_entity])
|
||||
|
||||
setup_tasks = [
|
||||
asyncio.create_task(async_setup_platform(p_type, p_config))
|
||||
for p_type, p_config in config_per_platform(config, DOMAIN)
|
||||
if p_type is not None
|
||||
]
|
||||
|
||||
if setup_tasks:
|
||||
await asyncio.wait(setup_tasks)
|
||||
for p_type, p_config in config_per_platform(config, DOMAIN):
|
||||
if p_type is not None:
|
||||
hass.async_create_task(
|
||||
async_setup_platform(p_type, p_config), eager_start=True
|
||||
)
|
||||
|
||||
async def async_platform_discovered(
|
||||
platform: str, info: DiscoveryInfoType | None
|
||||
|
Loading…
x
Reference in New Issue
Block a user