Update discovery to use async_add_executor_job (#41453)

pull/41476/head
J. Nick Koston 2020-10-08 02:20:07 -05:00 committed by GitHub
parent 52e8366ce7
commit 8a374590e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,9 @@ async def async_setup(hass, config):
async def scan_devices(now):
"""Scan for devices."""
try:
results = await hass.async_add_job(_discover, netdisco, zeroconf_instance)
results = await hass.async_add_executor_job(
_discover, netdisco, zeroconf_instance
)
for result in results:
hass.async_create_task(new_service_found(*result))