{"record":{"id":"a4efb34cc988ca47","repo":"home-assistant/core","slug":"no-config-entry","errorCode":"no_config_entry","errorMessage":"Device has not a valid blue_current config entry.","messagePattern":"Device has not a valid blue_current config entry\\.","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blue_current/services.py","lineNumber":56,"sourceCode":"    blue_current_config_entry: ConfigEntry | None = None\n\n    for config_entry_id in device.config_entries:\n        config_entry = service_call.hass.config_entries.async_get_entry(config_entry_id)\n        if not config_entry or config_entry.domain != DOMAIN:\n            # Not the blue_current config entry.\n            continue\n\n        if config_entry.state is not ConfigEntryState.LOADED:\n            raise ServiceValidationError(\n                translation_domain=DOMAIN, translation_key=\"config_entry_not_loaded\"\n            )\n\n        blue_current_config_entry = config_entry\n        break\n\n    if not blue_current_config_entry:\n        # The device is not connected to a valid blue_current config entry.\n        raise ServiceValidationError(\n            translation_domain=DOMAIN, translation_key=\"no_config_entry\"\n        )\n\n    connector = blue_current_config_entry.runtime_data\n\n    # Get the evse_id from the identifier of the device.\n    evse_id = next(\n        identifier[1] for identifier in device.identifiers if identifier[0] == DOMAIN\n    )\n\n    await connector.client.start_session(evse_id, charging_card_id)\n\n\n@callback\ndef async_setup_services(hass: HomeAssistant) -> None:\n    \"\"\"Register the services.\"\"\"\n\n    hass.services.async_register(","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blue_current/services.py#L38-L74","documentation":"ServiceValidationError with translation key 'no_config_entry' raised when a valid device was found but none of its config_entries is a loaded blue_current entry — the loop either found no blue_current domain entry at all, or matched entries were skipped (not the right domain). It means the device_id belongs to some other integration or an orphaned Blue Current device.","triggerScenarios":"Passing a device_id from a different integration (e.g. a generic camera or sensor device), or a Blue Current device left in the registry after the integration was removed. The for-loop over device.config_entries finds no loaded DOMAIN entry so blue_current_config_entry stays None.","commonSituations":"Device registry remnant after integration removal/re-add; picking the wrong device in a crowded device picker; script copied between installs where IDs differ.","solutions":["Select a device that actually belongs to the Blue Current integration (check Settings > Devices > Blue Current)","Remove stale Blue Current devices from the registry if the integration was deleted and re-added","Re-check the device_id spelling and source"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from homeassistant.helpers import device_registry as dr\n\nblue_current_devices = [\n    d for d in dr.async_get(hass).devices.values()\n    if any(e.domain == DOMAIN for e in map(\n        hass.config_entries.async_get_entry, d.config_entries\n    ) if e)\n]\n# pick device_id from blue_current_devices only","typeGuard":"def belongs_to_blue_current(device, hass) -> bool:\n    return any(\n        (ce := hass.config_entries.async_get_entry(ce_id)) and ce.domain == DOMAIN\n        for ce_id in device.config_entries\n    )","tryCatchPattern":"try:\n    await hass.services.async_call(DOMAIN, \"start_charge_session\", data, blocking=True)\nexcept HomeAssistantError as err:\n    if \"no_config_entry\" in str(err):\n        _LOGGER.warning(\"Device %s is not a Blue Current device\", device_id)","preventionTips":["Choose devices from the integration's device page, not the global device list","Purge orphaned Blue Current devices from the registry after reinstalls","Validate the device's config_entries reference the blue_current domain before calling"],"tags":["blue-current","service-validation","device-registry","config-entry"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}