home-assistant/core · warning · ServiceValidationError

no_config_entry_for_device

no_config_entry_for_device

Error message

No configuration entry found for device: {device_id}

What it means

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).

Source

Thrown at homeassistant/components/bsblan/services.py:149

    device_registry = dr.async_get(service_call.hass)
    device_entry = device_registry.async_get(device_id, include_child_devices=False)

    if device_entry is None:
        raise ServiceValidationError(
            translation_domain=DOMAIN,
            translation_key="invalid_device_id",
            translation_placeholders={"device_id": device_id},
        )

    # 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

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Use the action UI's device picker, which filters to bsblan devices.
  2. In YAML, verify the device_id belongs to the BSB-LAN integration via Developer Tools > Template (`device_attr(..., 'identifiers')`).
  3. If the device is a leftover registry orphan, remove it via Settings > Devices and re-select the real BSB-LAN device.
Defensive patterns

Strategy: validation

Validate before calling

# template check: device belongs to bsblan integration
{{ device_attr(device_id, 'identifiers') | select('search', 'bsblan') | list | length > 0 }}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/016ead3f6dd05ca7. Report an issue: GitHub.