From ad355b3396b95bbcd812aa43668a81270b0d148d Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Sat, 22 Apr 2023 12:31:32 +0200 Subject: [PATCH] Remove unreachable code in mqtt integration discovery (#91796) --- homeassistant/components/mqtt/discovery.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index 9349dd5458b..342e7d121f2 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -311,10 +311,7 @@ async def async_start( # noqa: C901 and result["reason"] in ("already_configured", "single_instance_allowed") ): - unsub = mqtt_data.integration_unsubscribe.pop(key, None) - if unsub is None: - return - unsub() + mqtt_data.integration_unsubscribe.pop(key)() for topic in topics: key = f"{integration}_{topic}"