From 7552404f70c61bff02b2f8a4e8f6951950190dfc Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 30 Jan 2022 22:21:54 -0600 Subject: [PATCH] Increase the timeout for flux_led directed discovery (#65222) --- homeassistant/components/flux_led/const.py | 1 + homeassistant/components/flux_led/discovery.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/flux_led/const.py b/homeassistant/components/flux_led/const.py index 95121b5685b..9113d52f5c8 100644 --- a/homeassistant/components/flux_led/const.py +++ b/homeassistant/components/flux_led/const.py @@ -51,6 +51,7 @@ FLUX_LED_EXCEPTIONS: Final = ( STARTUP_SCAN_TIMEOUT: Final = 5 DISCOVER_SCAN_TIMEOUT: Final = 10 +DIRECTED_DISCOVERY_TIMEOUT: Final = 15 CONF_MODEL: Final = "model" CONF_MODEL_NUM: Final = "model_num" diff --git a/homeassistant/components/flux_led/discovery.py b/homeassistant/components/flux_led/discovery.py index 32b0d0ed9df..0f65c7c1797 100644 --- a/homeassistant/components/flux_led/discovery.py +++ b/homeassistant/components/flux_led/discovery.py @@ -38,7 +38,7 @@ from .const import ( CONF_REMOTE_ACCESS_ENABLED, CONF_REMOTE_ACCESS_HOST, CONF_REMOTE_ACCESS_PORT, - DISCOVER_SCAN_TIMEOUT, + DIRECTED_DISCOVERY_TIMEOUT, DOMAIN, FLUX_LED_DISCOVERY, ) @@ -194,7 +194,7 @@ async def async_discover_device( """Direct discovery at a single ip instead of broadcast.""" # If we are missing the unique_id we should be able to fetch it # from the device by doing a directed discovery at the host only - for device in await async_discover_devices(hass, DISCOVER_SCAN_TIMEOUT, host): + for device in await async_discover_devices(hass, DIRECTED_DISCOVERY_TIMEOUT, host): if device[ATTR_IPADDR] == host: return device return None