Remove gather for loading generated files in zeroconf (#111699)
async_get_custom_components is the only place this can suspend and it will always be cached by the time this is called so there is no reason to schedule these on the event loop
This commit is contained in:
parent
c957ff49bf
commit
d164039bba
1 changed files with 2 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
|||
"""Support for exposing Home Assistant via Zeroconf."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import contextlib
|
||||
from contextlib import suppress
|
||||
from dataclasses import dataclass
|
||||
|
@ -215,9 +214,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
|
||||
aio_zc = await _async_get_instance(hass, **zc_args)
|
||||
zeroconf = cast(HaZeroconf, aio_zc.zeroconf)
|
||||
zeroconf_types, homekit_models = await asyncio.gather(
|
||||
async_get_zeroconf(hass), async_get_homekit(hass)
|
||||
)
|
||||
zeroconf_types = await async_get_zeroconf(hass)
|
||||
homekit_models = await async_get_homekit(hass)
|
||||
homekit_model_lookup, homekit_model_matchers = _build_homekit_model_lookups(
|
||||
homekit_models
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue