home-assistant/core · error · ConfigEntryNotReady

ConfigEntryNotReady

Error message

ConfigEntryNotReady

What it means

ConfigEntryNotReady is raised by the Blue Current integration when client.validate_api_token(api_token) fails with any BlueCurrentException other than InvalidApiToken — i.e. the websocket/API call to the Blue Current charge-point service failed at transport or protocol level. HA will retry setup with backoff; the InvalidApiToken case is handled separately as ConfigEntryAuthFailed.

Source

Thrown at homeassistant/components/blue_current/__init__.py:69

    async_setup_services(hass)
    return True


async def async_setup_entry(
    hass: HomeAssistant, config_entry: BlueCurrentConfigEntry
) -> bool:
    """Set up Blue Current as a config entry."""
    client = Client()
    api_token = config_entry.data[CONF_API_TOKEN]
    connector = Connector(hass, config_entry, client)

    try:
        await client.validate_api_token(api_token)
    except InvalidApiToken as err:
        raise ConfigEntryAuthFailed("Invalid API token.") from err
    except BlueCurrentException as err:
        raise ConfigEntryNotReady from err
    config_entry.async_create_background_task(
        hass, connector.run_task(), "blue_current-websocket"
    )

    await client.wait_for_charge_points()
    config_entry.runtime_data = connector
    await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

    return True


async def async_unload_entry(
    hass: HomeAssistant, config_entry: BlueCurrentConfigEntry
) -> bool:
    """Unload the Blue Current config entry."""

    return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Check the Blue Current service status / your charge point connectivity in the vendor app.
  2. Verify outbound network access from HA (DNS, proxy, firewall allowing wss).
  3. Retry by reloading the config entry once connectivity is restored — NotReady retries are automatic.
  4. If it persists with the service healthy, update HA so the bluecurrent_api package matches the current server protocol.
Defensive patterns

Strategy: retry

Validate before calling

import asyncio, socket

def dns_ok(host: str) -> bool:
    try:
        socket.getaddrinfo(host, 443)
    except OSError:
        return False
    return True

Try / catch

try:
    await client.validate_api_token(api_token)
except InvalidApiToken as err:
    raise ConfigEntryAuthFailed("Invalid API token.") from err
except BlueCurrentException as err:
    raise ConfigEntryNotReady from err

Prevention

When it happens

Trigger: `await client.validate_api_token(api_token)` cannot complete: websocket endpoint unreachable, connection dropped mid-handshake, malformed server response — any non-auth BlueCurrentException from the bluecurrent_api library.

Common situations: Blue Current API/cloud outage, HA host offline or DNS failing, network blocking outbound websocket (wss) connections, library version drift with server-side protocol changes.

Related errors


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