{"record":{"id":"d3202dac8a00c71e","repo":"home-assistant/core","slug":"config-entry-not-loaded-d3202d","errorCode":"config_entry_not_loaded","errorMessage":"Config entry not loaded.","messagePattern":"Config entry not loaded\\.","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blue_current/services.py","lineNumber":47,"sourceCode":"\n    # Get the device based on the given device ID.\n    device = dr.async_get(service_call.hass).devices.get(device_id)\n\n    if device is None:\n        raise ServiceValidationError(\n            translation_domain=DOMAIN, translation_key=\"invalid_device_id\"\n        )\n\n    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    )","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blue_current/services.py#L29-L65","documentation":"ServiceValidationError with translation key 'config_entry_not_loaded' raised by Blue Current service handlers when the device's blue_current config entry exists but its state is not ConfigEntryState.LOADED. The service cannot act on an integration that is currently failing, retrying, or disabled.","triggerScenarios":"The Blue Current WebSocket connection dropped and the entry went to SETUP_RETRY / SETUP_ERROR, or the user disabled the entry, and then start_charge_session (or sibling service) is invoked for a device of that entry.","commonSituations":"Cloud outage puts the entry in retry; entry disabled for troubleshooting then automations still fire; HA restart race where the service is called before setup completes.","solutions":["Open Settings > Devices & Services and check the Blue Current entry state; fix whatever put it in error/retry (token, connectivity)","Reload the entry and wait for it to show as Loaded before calling services","Re-enable the entry if it was disabled","Guard automations so they only run when the integration is operational"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"entry = next(\n    (hass.config_entries.async_get_entry(e) for e in device.config_entries\n     if (ce := hass.config_entries.async_get_entry(e)) and ce.domain == DOMAIN),\n    None,\n)\nif entry is None or entry.state is not ConfigEntryState.LOADED:\n    # skip or notify instead of calling the service\n    _LOGGER.warning(\"Blue Current entry not loaded; skipping service call\")","typeGuard":null,"tryCatchPattern":"try:\n    await hass.services.async_call(DOMAIN, \"start_charge_session\", data, blocking=True)\nexcept HomeAssistantError as err:\n    if \"config_entry_not_loaded\" in str(err):\n        _LOGGER.warning(\"Blue Current not ready; retry after entry reloads\")","preventionTips":["Gate Blue Current automations on the integration being loaded (e.g. a template binary_sensor on entry state)","Add wait/retry logic around HA restarts","Resolve entry errors (token/network) before scheduling charge sessions"],"tags":["blue-current","service-validation","config-entry","lifecycle"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}