{"record":{"id":"0da5ae065c926fde","repo":"home-assistant/core","slug":"config-entry-not-loaded-0da5ae","errorCode":"config_entry_not_loaded","errorMessage":"The device `{device_name}` is not currently loaded or available","messagePattern":"The device `(.+?)` is not currently loaded or available","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/bsblan/services.py","lineNumber":159,"sourceCode":"    # Find the config entry for this device\n    matching_entries: list[BSBLanConfigEntry] = [\n        entry\n        for entry in service_call.hass.config_entries.async_entries(DOMAIN)\n        if entry.entry_id in device_entry.config_entries\n    ]\n\n    if not matching_entries:\n        raise ServiceValidationError(\n            translation_domain=DOMAIN,\n            translation_key=\"no_config_entry_for_device\",\n            translation_placeholders={\"device_id\": device_entry.name or device_id},\n        )\n\n    entry = matching_entries[0]\n\n    # Verify the config entry is loaded\n    if entry.state is not ConfigEntryState.LOADED:\n        raise ServiceValidationError(\n            translation_domain=DOMAIN,\n            translation_key=\"config_entry_not_loaded\",\n            translation_placeholders={\"device_name\": device_entry.name or device_id},\n        )\n\n    return entry, device_entry\n\n\ndef _device_name(device_entry: dr.DeviceEntry) -> str:\n    \"\"\"Return the best available display name for a device.\"\"\"\n    return device_entry.name_by_user or device_entry.name or device_entry.id\n\n\ndef _ensure_water_heater_device(device_entry: dr.DeviceEntry) -> None:\n    \"\"\"Validate the service targets the water heater sub-device.\"\"\"\n    for domain, identifier in device_entry.identifiers:\n        if domain == DOMAIN and identifier.endswith(\"-water-heater\"):\n            return","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bsblan/services.py#L141-L177","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# automation: only run when integration is healthy\nconditions:\n  - condition: state\n    entity_id: climate.bsblan\n    state: not \"unavailable\"\n# plus tolerance for the action itself\naction: bsblan.sync_time\ndata: {device_id: \"...\"}\ncontinue_on_error: true","handlingStrategy":"validation","validationCode":"# automation condition: only run when the integration is loaded\nconditions:\n  - condition: template\n    value_template: \"{{ not is_state('climate.bsblan', 'unavailable') }}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["home-assistant","bsblan","config-entry","loaded-state","validation"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}