mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Switch sabnzbd to use async_add_executor_job (#41835)
This commit is contained in:
parent
68cfc36b6b
commit
9d9520b2f9
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user