CorantGmbH/home-assistant-core

Handle unavailability of an already configured device

Opened this issue · 0 comments

ConfigFlow.async_step_user handles multiple exceptions which can arise during a setup of a new device, specifically ClientConnectionError which is thrown when a device is not available (either due to an incorrect address or the device and the host not sharing the same WiFi).
However, if a configured device is not available at home assistant startup, homeassistant.components.airq.async_setup_entry throws a ClientConnectionError from coordinator.async_fetch_device_info, which is not caught. While catching the exception is trivial, I am not yet sure how to best handle it gracefully. What is the intended way to interrupt async_setup_entry?
Current workaround is to log a failure to connect and rely on home assistant built-in strategy to continue integration setup in the background. Seems to fragile and resource-inefficient.