home-assistant/core · error · ServiceValidationError
no_config_entry
no_config_entry
Error message
Device has not a valid blue_current config entry.
What it means
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.
Source
Thrown at homeassistant/components/blue_current/services.py:56
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
)
await connector.client.start_session(evse_id, charging_card_id)
@callback
def async_setup_services(hass: HomeAssistant) -> None:
"""Register the services."""
hass.services.async_register(View on GitHub (pinned to 58a3fdb3ea)
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
Defensive patterns
Strategy: validation
Validate before calling
from homeassistant.helpers import device_registry as dr
blue_current_devices = [
d for d in dr.async_get(hass).devices.values()
if any(e.domain == DOMAIN for e in map(
hass.config_entries.async_get_entry, d.config_entries
) if e)
]
# pick device_id from blue_current_devices only Type guard
def belongs_to_blue_current(device, hass) -> bool:
return any(
(ce := hass.config_entries.async_get_entry(ce_id)) and ce.domain == DOMAIN
for ce_id in device.config_entries
) Try / catch
try:
await hass.services.async_call(DOMAIN, "start_charge_session", data, blocking=True)
except HomeAssistantError as err:
if "no_config_entry" in str(err):
_LOGGER.warning("Device %s is not a Blue Current device", device_id) Prevention
- 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
When it happens
Trigger: 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.
Common situations: Device registry remnant after integration removal/re-add; picking the wrong device in a crowded device picker; script copied between installs where IDs differ.
Related errors
- invalid_device_id
- config_entry_not_loaded
- config_entry_not_loaded
- Invalid API token.
- Credential is already linked to a user
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/a4efb34cc988ca47.
Report an issue: GitHub.