{"record":{"id":"ecf5d1aaa219b21f","repo":"home-assistant/core","slug":"connect-failed","errorCode":null,"errorMessage":"connect_failed","messagePattern":"connect_failed","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"error","filePath":"homeassistant/components/broadlink/device.py","lineNumber":121,"sourceCode":"            config.data[CONF_TYPE],\n            (config.data[CONF_HOST], DEFAULT_PORT),\n            bytes.fromhex(config.data[CONF_MAC]),\n            name=config.title,\n        )\n        api.timeout = config.data[CONF_TIMEOUT]\n        self.api = api\n\n        try:\n            self.fw_version = await self.hass.async_add_executor_job(\n                self._get_firmware_version\n            )\n\n        except AuthenticationError:\n            await self._async_handle_auth_error()\n            return False\n\n        except (NetworkTimeoutError, OSError) as err:\n            raise ConfigEntryNotReady(\n                translation_domain=DOMAIN,\n                translation_key=\"connect_failed\",\n                translation_placeholders={\n                    \"host\": api.host[0],\n                    \"error\": str(err),\n                },\n            ) from err\n\n        except BroadlinkException as err:\n            _LOGGER.error(\n                \"Failed to authenticate to the device at %s: %s\", api.host[0], err\n            )\n            return False\n\n        self.authorized = True\n\n        update_manager = get_update_manager(self)\n        coordinator = update_manager.coordinator","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/broadlink/device.py#L103-L139","documentation":"ConfigEntryNotReady with translation key connect_failed, raised in BroadlinkDevice.async_connect when reading the firmware version fails with NetworkTimeoutError or OSError. HA treats it as a retryable setup failure: the config entry is placed in setup_retry and retried with backoff. Note AuthenticationError is handled separately (auth flow) and other BroadlinkException subclass errors take a different logging path.","triggerScenarios":"Setting up or reloading a Broadlink entry while the device is unreachable: wrong IP, device rebooting, Wi-Fi drop, firewall blocking UDP 80, or the device not yet on the network after power-on.","commonSituations":"Device got a new DHCP IP after router restart, device powered off/rebooting, unstable Wi-Fi for battery Wi-Fi models, mDNS discovery data stale.","solutions":["Ping the device / check it responds on the LAN; HA will auto-retry once it is reachable.","Reserve a static DHCP lease or set a static IP on the device so the stored host never goes stale.","Power-cycle the Broadlink device if it is hung (LED not responding).","If the host changed, reconfigure the integration's host via the reconfigure flow rather than re-adding."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"# ConfigEntryNotReady is already retried by HA with backoff; only log/suppress in custom setups\ntry:\n    await device.async_connect()\nexcept ConfigEntryNotReady as err:\n    if err.translation_key == \"connect_failed\":\n        _LOGGER.warning(\"Broadlink not ready (%s); HA will retry\", err)","preventionTips":["Assign a DHCP reservation to every Broadlink device.","Let HA's built-in retry handle transient outages instead of re-adding the integration.","Use the reconfigure flow when the device IP changes rather than deleting the entry."],"tags":["home-assistant","broadlink","network","setup-retry"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}