Skip to content

Removed presence entities remain permanently stuck in per-room presence_persons config — cannot be unassigned via UI #397

Description

@Luke2105-Loft59

RoomMind version

1.75

Home Assistant version

2026.7.4

Description

When a presence-tracking entity (e.g. device_tracker.jr_iphone_14) is deleted from Home Assistant's entity registry, it is not automatically removed from a room's presence_persons config in RoomMind, even after a full HA restart. Removing/replacing the entity in the global presence settings does not affect the per-room override lists — the stale entity_id remains stored there indefinitely.

Because the room-level "Anwesenheit" edit dialog only renders checkboxes for currently-existing entities, the stale entity never appears as a selectable/deselectable option — making it impossible to remove via the UI once the source entity is gone. Meanwhile, the "Anwesenheit" overview card on the dashboard still iterates the raw stored list and displays the dead entity (with a fallback "Abwesend" state, since it has no real state).

Steps to reproduce

  1. Assign a device_tracker.* entity to a room's presence override (per-room, not just global).
  2. Delete that entity from Home Assistant (confirmed via Developer Tools → States: "Keine Entitäten" for it afterward — fully removed from the registry).
  3. Restart Home Assistant completely.
  4. Open the room's "Anwesenheit" edit dialog → the deleted entity is correctly absent from the selectable list.
  5. Open the room's "Anwesenheit" dashboard card → the deleted entity still appears, listed as "Abwesend".

Expected behavior: Deleted entities should be pruned from presence_persons (and other entity-referencing config lists, e.g. mold_notification_targets) automatically, or at minimum be shown/removable in the edit UI even if stale.

Actual behavior: Entity is permanently stuck in the room config with no UI path to remove it.

Additional info: Confirmed via config entry diagnostics — the stale device_tracker.jr_iphone_14 reference appears in data.rooms..config.presence_persons for three separate rooms (bad, schlafzimmer, loft), plus in data.settings.mold_notification_targets[0].entity_id (as notify.mobile_app_jr_iphone_14), while being completely absent from data.settings.presence_persons (the global list). Happy to attach the (redacted) diagnostics file if helpful.

Diagnostics

No response

Relevant log output


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions