{"record":{"id":"2340953b9570b17d","repo":"home-assistant/core","slug":"configentryerror","errorCode":null,"errorMessage":"ConfigEntryError","messagePattern":"ConfigEntryError","errorType":"exception","errorClass":"ConfigEntryError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blebox/__init__.py","lineNumber":61,"sourceCode":"    password = entry.data.get(CONF_PASSWORD)\n\n    timeout = DEFAULT_SETUP_TIMEOUT\n\n    websession = get_maybe_authenticated_session(hass, password, username)\n\n    api_host = ApiHost(host, port, timeout, websession, hass.loop)\n\n    try:\n        product = await Box.async_from_host(api_host)\n    except UnauthorizedRequest as ex:\n        raise ConfigEntryAuthFailed from ex\n    except (\n        ConnectionError,\n        HttpError,\n    ) as ex:\n        raise ConfigEntryNotReady from ex\n    except Error as ex:\n        raise ConfigEntryError from ex\n\n    coordinator = BleBoxCoordinator(hass, entry, product)\n    await coordinator.async_config_entry_first_refresh()\n\n    entry.runtime_data = coordinator\n\n    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)\n\n    return True\n\n\nasync def async_unload_entry(hass: HomeAssistant, entry: BleBoxConfigEntry) -> bool:\n    \"\"\"Unload a config entry.\"\"\"\n    return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)\n","sourceCodeStart":43,"sourceCodeEnd":76,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blebox/__init__.py#L43-L76","documentation":"ConfigEntryError is Home Assistant's non-retriable setup error: the entry goes into a failed state requiring user action (no automatic retries). The blebox integration raises it when Box.async_from_host() fails with the library's base Error that is neither UnauthorizedRequest nor ConnectionError/HttpError — typically an unsupported or malformed device response (e.g. the /api/device/product API returned data the library cannot parse).","triggerScenarios":"async_from_host fetches product info and the blebox_unofficial library raises a plain Error subclass — unsupported product type, unexpected/missing fields in the device's JSON, or an API shape from newer firmware the installed library version doesn't understand.","commonSituations":"Newer device firmware changing API responses beyond the pinned blebox-unofficial-api version, pointing the integration at a non-BleBox device on the same IP, partially failed device firmware returning truncated JSON.","solutions":["Verify the host actually is a BleBox device: open http://<host>/api/device/product and check the response.","Update (or align) the `blebox-unofficial-api` package version to one supporting your firmware, and update HA core.","Power-cycle the device and reload the entry — a wedged controller can emit malformed responses.","If the device is genuinely unsupported, remove the config entry; ConfigEntryError will not self-heal by retrying.","Report the product JSON (from step 1) to the blebox_unofficial-api maintainers if firmware drift is confirmed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import aiohttp\n\nasync def is_blebox_device(session: aiohttp.ClientSession, host: str) -> bool:\n    \"\"\"Confirm the endpoint is a parseable BleBox before adding it.\"\"\"\n    async with session.get(f\"http://{host}/api/device/product\") as resp:\n        if resp.status != 200:\n            return False\n        data = await resp.json(content_type=None)\n        return all(k in data for k in (\"id\", \"type\", \"apiLevel\"))","typeGuard":null,"tryCatchPattern":"try:\n    product = await Box.async_from_host(api_host)\nexcept Error as ex:  # after Unauthorized/Connection/Http branches\n    raise ConfigEntryError from ex  # permanent: needs user action","preventionTips":["Probe /api/device/product manually before configuring to catch unsupported firmware early.","Update HA (and its pinned blebox-unofficial-api) before blaming the device.","Remember ConfigEntryError never auto-retries — fix the root cause, then reload the entry."],"tags":["home-assistant","blebox","config-entry","unsupported-device","parsing"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}