Load light profiles in a task to avoid delaying platform setup (#114038)
parent
4f22c85e39
commit
900e0c07bf
|
@ -403,7 +403,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa:
|
|||
await component.async_setup(config)
|
||||
|
||||
profiles = hass.data[DATA_PROFILES] = Profiles(hass)
|
||||
await profiles.async_initialize()
|
||||
# Profiles are loaded in a separate task to avoid delaying the setup
|
||||
# of the light base platform.
|
||||
hass.async_create_task(profiles.async_initialize(), eager_start=True)
|
||||
|
||||
def preprocess_data(data: dict[str, Any]) -> dict[str | vol.Optional, Any]:
|
||||
"""Preprocess the service data."""
|
||||
|
|
Loading…
Reference in New Issue