home-assistant/core · warning · ServiceValidationError
config_entry_not_loaded
config_entry_not_loaded
Error message
The device `{device_name}` is not currently loaded or available What it means
ServiceValidationError raised when the resolved bsblan config entry exists but is not in the LOADED state (e.g. SETUP_RETRY after a connection error, NOT_LOADED, or FAILED). Translation key `config_entry_not_loaded` includes the device name. It prevents service calls from touching a `runtime_data.client` that would not exist.
Source
Thrown at homeassistant/components/bsblan/services.py:159
# Find the config entry for this device
matching_entries: list[BSBLanConfigEntry] = [
entry
for entry in service_call.hass.config_entries.async_entries(DOMAIN)
if entry.entry_id in device_entry.config_entries
]
if not matching_entries:
raise ServiceValidationError(
translation_domain=DOMAIN,
translation_key="no_config_entry_for_device",
translation_placeholders={"device_id": device_entry.name or device_id},
)
entry = matching_entries[0]
# Verify the config entry is loaded
if entry.state is not ConfigEntryState.LOADED:
raise ServiceValidationError(
translation_domain=DOMAIN,
translation_key="config_entry_not_loaded",
translation_placeholders={"device_name": device_entry.name or device_id},
)
return entry, device_entry
def _device_name(device_entry: dr.DeviceEntry) -> str:
"""Return the best available display name for a device."""
return device_entry.name_by_user or device_entry.name or device_entry.id
def _ensure_water_heater_device(device_entry: dr.DeviceEntry) -> None:
"""Validate the service targets the water heater sub-device."""
for domain, identifier in device_entry.identifiers:
if domain == DOMAIN and identifier.endswith("-water-heater"):
returnView on GitHub (pinned to 58a3fdb3ea)
Solutions
- Fix the underlying setup problem (see the integration card's error) and let the entry reach LOADED, then retry.
- In automations, gate the action on the integration being loaded (e.g. a condition on the update status or entity availability).
- Add `continue_on_error` or error-handling to automations that call bsblan actions during likely offline windows.
Example fix
# automation: only run when integration is healthy
conditions:
- condition: state
entity_id: climate.bsblan
state: not "unavailable"
# plus tolerance for the action itself
action: bsblan.sync_time
data: {device_id: "..."}
continue_on_error: true Defensive patterns
Strategy: validation
Validate before calling
# automation condition: only run when the integration is loaded
conditions:
- condition: template
value_template: "{{ not is_state('climate.bsblan', 'unavailable') }}" Prevention
- Gate bsblan actions on entity availability conditions.
- Fix persistent SETUP_RETRY states rather than letting automations hammer a dead entry.
- Disable automations that target an integration you intend to keep unloaded.
When it happens
Trigger: Calling a bsblan action while the integration is retrying setup (device offline), was reloaded and failed, or is disabled — `entry.state is not ConfigEntryState.LOADED` is true.
Common situations: Device offline at the moment an automation fires the action; entry stuck in SETUP_RETRY after a network outage; user disabled the integration but left automations pointing at its devices.
Related errors
- no_config_entry_for_device
- end_time_before_start_time
- invalid_device_id
- not_a_water_heater_device
- Credential is already linked to a user
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/0da5ae065c926fde.
Report an issue: GitHub.