forked from home-assistant/core
Load light profiles in a task to avoid delaying platform setup (#114038)
This commit is contained in:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user