From 4a5c5fa311848de74406c23f5b31fbeca21d53e7 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Sun, 26 May 2024 16:04:03 +0200 Subject: [PATCH] Remove remove unreachable code in async_wait_for_mqtt_client (#118172) --- homeassistant/components/mqtt/util.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/homeassistant/components/mqtt/util.py b/homeassistant/components/mqtt/util.py index 3611b809c46..eeca2361305 100644 --- a/homeassistant/components/mqtt/util.py +++ b/homeassistant/components/mqtt/util.py @@ -114,8 +114,6 @@ async def async_wait_for_mqtt_client(hass: HomeAssistant) -> bool: hass.data[DATA_MQTT_AVAILABLE] = state_reached_future else: state_reached_future = hass.data[DATA_MQTT_AVAILABLE] - if state_reached_future.done(): - return state_reached_future.result() try: async with asyncio.timeout(AVAILABILITY_TIMEOUT):