{"record":{"id":"016ead3f6dd05ca7","repo":"home-assistant/core","slug":"no-config-entry-for-device","errorCode":"no_config_entry_for_device","errorMessage":"No configuration entry found for device: {device_id}","messagePattern":"No configuration entry found for device: (.+?)","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/bsblan/services.py","lineNumber":149,"sourceCode":"    device_registry = dr.async_get(service_call.hass)\n    device_entry = device_registry.async_get(device_id, include_child_devices=False)\n\n    if device_entry is None:\n        raise ServiceValidationError(\n            translation_domain=DOMAIN,\n            translation_key=\"invalid_device_id\",\n            translation_placeholders={\"device_id\": device_id},\n        )\n\n    # 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","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bsblan/services.py#L131-L167","documentation":"ServiceValidationError raised during bsblan service resolution when the device exists in the registry but none of its config entries belong to the bsblan domain — i.e. the selected device is not managed by the BSB-LAN integration. Translation key `no_config_entry_for_device` reports the device's display name (or raw ID).","triggerScenarios":"Passing a device_id belonging to another integration (e.g. a template sensor, ESPHome node, or the boiler's other integration) to `bsblan.set_hot_water_schedule` or `bsblan.sync_time`; the loop over `hass.config_entries.async_entries(DOMAIN)` finds no entry shared with the device.","commonSituations":"Multiple integrations exposing similar devices (user picks the wrong one in a YAML hand-written call); devices whose entries were removed but registry entries lingered.","solutions":["Use the action UI's device picker, which filters to bsblan devices.","In YAML, verify the device_id belongs to the BSB-LAN integration via Developer Tools > Template (`device_attr(..., 'identifiers')`).","If the device is a leftover registry orphan, remove it via Settings > Devices and re-select the real BSB-LAN device."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# template check: device belongs to bsblan integration\n{{ device_attr(device_id, 'identifiers') | select('search', 'bsblan') | list | length > 0 }}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the UI device picker filtered to bsblan devices.","Remove orphaned registry devices from removed integrations.","When writing YAML, verify the device's integration_domain before committing."],"tags":["home-assistant","bsblan","device-id","config-entry","validation"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}