Update discovery to use async_add_executor_job (#41453)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-10-08 09:20:07 +02:00
1 parent 52e8366ce7
commit 8a374590e8
1 file changed
+3 -1
@@ -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))