mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +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()
|
component.register_shutdown()
|
||||||
await component.async_add_entities([mailbox_entity])
|
await component.async_add_entities([mailbox_entity])
|
||||||
|
|
||||||
setup_tasks = [
|
for p_type, p_config in config_per_platform(config, DOMAIN):
|
||||||
asyncio.create_task(async_setup_platform(p_type, p_config))
|
if p_type is not None:
|
||||||
for p_type, p_config in config_per_platform(config, DOMAIN)
|
hass.async_create_task(
|
||||||
if p_type is not None
|
async_setup_platform(p_type, p_config), eager_start=True
|
||||||
]
|
)
|
||||||
|
|
||||||
if setup_tasks:
|
|
||||||
await asyncio.wait(setup_tasks)
|
|
||||||
|
|
||||||
async def async_platform_discovered(
|
async def async_platform_discovered(
|
||||||
platform: str, info: DiscoveryInfoType | None
|
platform: str, info: DiscoveryInfoType | None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user