From 5230aa8917db4631b66ccbc1deaaa8b94713e04e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 23 Apr 2025 19:52:35 -1000 Subject: [PATCH] Increase zeroconf timeout to 10s (#143541) --- homeassistant/components/zeroconf/const.py | 2 ++ homeassistant/components/zeroconf/discovery.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/zeroconf/const.py b/homeassistant/components/zeroconf/const.py index 3a99a6758ca..6267d18642c 100644 --- a/homeassistant/components/zeroconf/const.py +++ b/homeassistant/components/zeroconf/const.py @@ -3,3 +3,5 @@ DOMAIN = "zeroconf" ZEROCONF_TYPE = "_home-assistant._tcp.local." + +REQUEST_TIMEOUT = 10000 # 10 seconds diff --git a/homeassistant/components/zeroconf/discovery.py b/homeassistant/components/zeroconf/discovery.py index b2e06c19948..0ea0e4c1619 100644 --- a/homeassistant/components/zeroconf/discovery.py +++ b/homeassistant/components/zeroconf/discovery.py @@ -24,7 +24,7 @@ from homeassistant.helpers.service_info.zeroconf import ( from homeassistant.loader import HomeKitDiscoveredIntegration, ZeroconfMatcher from homeassistant.util.hass_dict import HassKey -from .const import DOMAIN +from .const import DOMAIN, REQUEST_TIMEOUT if TYPE_CHECKING: from .models import HaZeroconf @@ -296,7 +296,7 @@ class ZeroconfDiscovery: name: str, ) -> None: """Update and process a zeroconf update.""" - await async_service_info.async_request(zeroconf, 3000) + await async_service_info.async_request(zeroconf, REQUEST_TIMEOUT) self._async_process_service_update(async_service_info, service_type, name) @callback