mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 05:35:11 +02:00
Update discovery to use async_add_executor_job (#41453)
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user