home-assistant/core · error · ConfigEntryNotReady

connect_failed

Error message

connect_failed

What it means

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.

Source

Thrown at homeassistant/components/broadlink/device.py:121

            config.data[CONF_TYPE],
            (config.data[CONF_HOST], DEFAULT_PORT),
            bytes.fromhex(config.data[CONF_MAC]),
            name=config.title,
        )
        api.timeout = config.data[CONF_TIMEOUT]
        self.api = api

        try:
            self.fw_version = await self.hass.async_add_executor_job(
                self._get_firmware_version
            )

        except AuthenticationError:
            await self._async_handle_auth_error()
            return False

        except (NetworkTimeoutError, OSError) as err:
            raise ConfigEntryNotReady(
                translation_domain=DOMAIN,
                translation_key="connect_failed",
                translation_placeholders={
                    "host": api.host[0],
                    "error": str(err),
                },
            ) from err

        except BroadlinkException as err:
            _LOGGER.error(
                "Failed to authenticate to the device at %s: %s", api.host[0], err
            )
            return False

        self.authorized = True

        update_manager = get_update_manager(self)
        coordinator = update_manager.coordinator

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Ping the device / check it responds on the LAN; HA will auto-retry once it is reachable.
  2. Reserve a static DHCP lease or set a static IP on the device so the stored host never goes stale.
  3. Power-cycle the Broadlink device if it is hung (LED not responding).
  4. If the host changed, reconfigure the integration's host via the reconfigure flow rather than re-adding.
Defensive patterns

Strategy: retry

Try / catch

# ConfigEntryNotReady is already retried by HA with backoff; only log/suppress in custom setups
try:
    await device.async_connect()
except ConfigEntryNotReady as err:
    if err.translation_key == "connect_failed":
        _LOGGER.warning("Broadlink not ready (%s); HA will retry", err)

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/ecf5d1aaa219b21f. Report an issue: GitHub.