mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Make zeroconf lookups background tasks (#112669)
* Make zeroconf lookups background tasks There were blocking startup and shutdown * disable for now
This commit is contained in:
parent
d40bd0f6c8
commit
a12fa0383b
@ -414,10 +414,11 @@ class ZeroconfDiscovery:
|
|||||||
if async_service_info.load_from_cache(zeroconf):
|
if async_service_info.load_from_cache(zeroconf):
|
||||||
self._async_process_service_update(async_service_info, service_type, name)
|
self._async_process_service_update(async_service_info, service_type, name)
|
||||||
else:
|
else:
|
||||||
self.hass.async_create_task(
|
self.hass.async_create_background_task(
|
||||||
self._async_lookup_and_process_service_update(
|
self._async_lookup_and_process_service_update(
|
||||||
zeroconf, async_service_info, service_type, name
|
zeroconf, async_service_info, service_type, name
|
||||||
)
|
),
|
||||||
|
name=f"zeroconf lookup {name}.{service_type}",
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _async_lookup_and_process_service_update(
|
async def _async_lookup_and_process_service_update(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user