mirror of
https://github.com/home-assistant/core.git
synced 2025-04-30 20:27:57 +00:00
Update discovery to use async_add_executor_job (#41453)
This commit is contained in:
parent
52e8366ce7
commit
8a374590e8
@ -193,7 +193,9 @@ async def async_setup(hass, config):
|
|||||||
async def scan_devices(now):
|
async def scan_devices(now):
|
||||||
"""Scan for devices."""
|
"""Scan for devices."""
|
||||||
try:
|
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:
|
for result in results:
|
||||||
hass.async_create_task(new_service_found(*result))
|
hass.async_create_task(new_service_found(*result))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user