Avoid blocking IO in downloader initialization (#114841)

* Avoid blocking IO in downloader initialization

* Avoid blocking IO in downloader initialization
This commit is contained in:
Joost Lekkerkerker 2024-04-04 13:45:44 +02:00 committed by Franck Nijhof
parent 0191d3e41b
commit aa14793479
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -83,7 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if not os.path.isabs(download_path):
download_path = hass.config.path(download_path)
if not os.path.isdir(download_path):
if not await hass.async_add_executor_job(os.path.isdir, download_path):
_LOGGER.error(
"Download path %s does not exist. File Downloader not active", download_path
)