From 4a21cd9d4781b6a2959242e28d9b252c50c972b5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 21 Feb 2024 17:33:16 -0700 Subject: [PATCH] Adjust zeroconf ServiceInfo query timeout to 3 seconds --- esphome/zeroconf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/zeroconf.py b/esphome/zeroconf.py index 77044d4a11..59db569a7f 100644 --- a/esphome/zeroconf.py +++ b/esphome/zeroconf.py @@ -110,7 +110,8 @@ class DashboardImportDiscovery: self, zeroconf: Zeroconf, info: AsyncServiceInfo, service_type: str, name: str ) -> None: """Process a service info.""" - if await info.async_request(zeroconf, timeout=5): + # Timeout in 3s (async_request wants the timeout in millis) + if await info.async_request(zeroconf, timeout=3000): self._process_service_info(name, info) def _process_service_info(self, name: str, info: ServiceInfo) -> None: