From f487c04e02d3c08bbb507dd28cd845bf80c5f6a0 Mon Sep 17 00:00:00 2001 From: Avi Miller Date: Fri, 13 May 2022 21:30:44 +1000 Subject: [PATCH] Remove LIFX bulb discovery from the inflight list if it fails to connect (#71673) Remove the bulb discovery from the inflight list if it fails to connect Signed-off-by: Avi Miller --- homeassistant/components/lifx/light.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/lifx/light.py b/homeassistant/components/lifx/light.py index 188959adc76..31e973874d9 100644 --- a/homeassistant/components/lifx/light.py +++ b/homeassistant/components/lifx/light.py @@ -416,6 +416,8 @@ class LIFXManager: if color_resp is None or version_resp is None: _LOGGER.error("Failed to connect to %s", bulb.ip_addr) bulb.registered = False + if bulb.mac_addr in self.discoveries_inflight: + self.discoveries_inflight.pop(bulb.mac_addr) else: bulb.timeout = MESSAGE_TIMEOUT bulb.retry_count = MESSAGE_RETRIES