From 3b2893f2f4e16f9a05d9cc4a7ba9f31984c841be Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 17 Aug 2024 15:14:28 -0500 Subject: [PATCH] Fix blocking I/O while validating core config schema (#124125) --- homeassistant/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/config.py b/homeassistant/config.py index 5066dffab47..9063429ca91 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -817,7 +817,9 @@ async def async_process_ha_core_config(hass: HomeAssistant, config: dict) -> Non 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. if not hasattr(hass, "auth"):