Fix opentherm_gw startup failure handling ()

pull/76409/head
mvn23 2022-08-07 18:10:32 +02:00 committed by GitHub
parent a6963e6a38
commit ddf3d23c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
homeassistant/components/opentherm_gw

View File

@ -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