From ac4eef0571b1ad9559b63badc3d643eb2e6b4d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Tue, 2 Sep 2025 09:37:43 +0100 Subject: [PATCH] Add back missing controller cleanup to Govee Light Local (#151541) --- .../components/govee_light_local/config_flow.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/govee_light_local/config_flow.py b/homeassistant/components/govee_light_local/config_flow.py index 8370da01669d..a1f601b28889 100644 --- a/homeassistant/components/govee_light_local/config_flow.py +++ b/homeassistant/components/govee_light_local/config_flow.py @@ -52,14 +52,9 @@ async def _async_discover(hass: HomeAssistant, adapter_ip: IPv4Address) -> bool: _LOGGER.debug("No devices found with IP %s", adapter_ip) devices_count = len(controller.devices) - cleanup_complete_events: list[asyncio.Event] = [] + cleanup_complete: asyncio.Event = controller.cleanup() with suppress(TimeoutError): - await asyncio.gather( - *[ - asyncio.wait_for(cleanup_complete_event.wait(), 1) - for cleanup_complete_event in cleanup_complete_events - ] - ) + await asyncio.wait_for(cleanup_complete.wait(), 1) return devices_count > 0