From a12fa0383b666ae2ebfc073392485cef85799881 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 7 Mar 2024 18:37:56 -1000 Subject: [PATCH] Make zeroconf lookups background tasks (#112669) * Make zeroconf lookups background tasks There were blocking startup and shutdown * disable for now --- homeassistant/components/zeroconf/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/zeroconf/__init__.py b/homeassistant/components/zeroconf/__init__.py index 344c174242a..d580f097179 100644 --- a/homeassistant/components/zeroconf/__init__.py +++ b/homeassistant/components/zeroconf/__init__.py @@ -414,10 +414,11 @@ class ZeroconfDiscovery: if async_service_info.load_from_cache(zeroconf): self._async_process_service_update(async_service_info, service_type, name) else: - self.hass.async_create_task( + self.hass.async_create_background_task( self._async_lookup_and_process_service_update( zeroconf, async_service_info, service_type, name - ) + ), + name=f"zeroconf lookup {name}.{service_type}", ) async def _async_lookup_and_process_service_update(