Fix blocking I/O while validating core config schema (#124125)

pull/124137/head
J. Nick Koston 2024-08-17 15:14:28 -05:00 committed by GitHub
parent 63d1cc10e2
commit 3b2893f2f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -817,7 +817,9 @@ async def async_process_ha_core_config(hass: HomeAssistant, config: dict) -> Non
This method is a coroutine. This method is a coroutine.
""" """
config = CORE_CONFIG_SCHEMA(config) # CORE_CONFIG_SCHEMA is not async safe since it uses vol.IsDir
# so we need to run it in an executor job.
config = await hass.async_add_executor_job(CORE_CONFIG_SCHEMA, config)
# Only load auth during startup. # Only load auth during startup.
if not hasattr(hass, "auth"): if not hasattr(hass, "auth"):