home-assistant/core · error · ServiceValidationError
config_entry_not_loaded
config_entry_not_loaded
Error message
Config entry not loaded.
What it means
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.
Source
Thrown at homeassistant/components/blue_current/services.py:47
# Get the device based on the given device ID.
device = dr.async_get(service_call.hass).devices.get(device_id)
if device is None:
raise ServiceValidationError(
translation_domain=DOMAIN, translation_key="invalid_device_id"
)
blue_current_config_entry: ConfigEntry | None = None
for config_entry_id in device.config_entries:
config_entry = service_call.hass.config_entries.async_get_entry(config_entry_id)
if not config_entry or config_entry.domain != DOMAIN:
# Not the blue_current config entry.
continue
if config_entry.state is not ConfigEntryState.LOADED:
raise ServiceValidationError(
translation_domain=DOMAIN, translation_key="config_entry_not_loaded"
)
blue_current_config_entry = config_entry
break
if not blue_current_config_entry:
# The device is not connected to a valid blue_current config entry.
raise ServiceValidationError(
translation_domain=DOMAIN, translation_key="no_config_entry"
)
connector = blue_current_config_entry.runtime_data
# Get the evse_id from the identifier of the device.
evse_id = next(
identifier[1] for identifier in device.identifiers if identifier[0] == DOMAIN
)View on GitHub (pinned to 58a3fdb3ea)
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
Defensive patterns
Strategy: validation
Validate before calling
entry = next(
(hass.config_entries.async_get_entry(e) for e in device.config_entries
if (ce := hass.config_entries.async_get_entry(e)) and ce.domain == DOMAIN),
None,
)
if entry is None or entry.state is not ConfigEntryState.LOADED:
# skip or notify instead of calling the service
_LOGGER.warning("Blue Current entry not loaded; skipping service call") Try / catch
try:
await hass.services.async_call(DOMAIN, "start_charge_session", data, blocking=True)
except HomeAssistantError as err:
if "config_entry_not_loaded" in str(err):
_LOGGER.warning("Blue Current not ready; retry after entry reloads") Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/d3202dac8a00c71e.
Report an issue: GitHub.