From 9d9520b2f98954a4bb950f188cc14e268b9be86d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 14 Oct 2020 13:27:34 -0500 Subject: [PATCH] Switch sabnzbd to use async_add_executor_job (#41835) --- homeassistant/components/sabnzbd/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/sabnzbd/__init__.py b/homeassistant/components/sabnzbd/__init__.py index 64265f71903..8574e82aa47 100644 --- a/homeassistant/components/sabnzbd/__init__.py +++ b/homeassistant/components/sabnzbd/__init__.py @@ -110,7 +110,9 @@ async def async_configure_sabnzbd( uri_scheme = "https" if use_ssl else "http" base_url = BASE_URL_FORMAT.format(uri_scheme, host, port) if api_key is None: - conf = await hass.async_add_job(load_json, hass.config.path(CONFIG_FILE)) + conf = await hass.async_add_executor_job( + load_json, hass.config.path(CONFIG_FILE) + ) api_key = conf.get(base_url, {}).get(CONF_API_KEY, "") sab_api = SabnzbdApi(