From ddf3d23c27739b64baee589e2f97ef6b00886d24 Mon Sep 17 00:00:00 2001 From: mvn23 <schopdiedwaas@gmail.com> Date: Sun, 7 Aug 2022 18:10:32 +0200 Subject: [PATCH] Fix opentherm_gw startup failure handling (#76376) --- homeassistant/components/opentherm_gw/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/opentherm_gw/__init__.py b/homeassistant/components/opentherm_gw/__init__.py index cdf360c8795..51071c9a0a1 100644 --- a/homeassistant/components/opentherm_gw/__init__.py +++ b/homeassistant/components/opentherm_gw/__init__.py @@ -117,6 +117,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b timeout=CONNECTION_TIMEOUT, ) except (asyncio.TimeoutError, ConnectionError, SerialException) as ex: + await gateway.cleanup() raise ConfigEntryNotReady( f"Could not connect to gateway at {gateway.device_path}: {ex}" ) from ex -- GitLab