github Franz646/orphan-cleaner v4.2.0
v4.2.0 - Safer detection with categories, still-used check, orphan devices

latest release: v4.2.1
5 hours ago

What's new in 4.2.0

Safer detection: every candidate now has a category. Previous versions could list entities that were only temporarily unavailable, or belonged to an integration you had disabled on purpose. 4.2.0 tells them apart.

Category Meaning Deleted by "delete all"?
Safe Nothing provides the entity any more (integration removed, or "no longer provided" by a running integration) Yes
To review Integration disabled, failing or retrying setup, or heuristic match No
Only unavailable Still provided, but unavailable for at least Min age (device off) No

New

  • "No longer provided" detection based on Home Assistant's own restored: true state attribute - the same signal behind the yellow warning in the entity settings.
  • "Still used" check: entities referenced by automations, scripts or scenes get a red used by N badge, are never auto-selected, and trigger a warning before deletion.
  • Orphan devices: devices with no entities left and no integration are listed and can be removed from the panel or with the new orphan_cleaner.delete_orphan_devices service.
  • Start-up grace period: for the first 10 minutes after Home Assistant starts, "no longer provided" entities are not reported, because integrations may still be loading. The panel shows a notice.
  • Each row now shows the reason it was listed.

Changed

  • orphan_cleaner.delete_orphans without entity_ids now deletes only the safe category. Entities to review or only unavailable must be listed explicitly.
  • The age of unavailable entities is now measured from the state's last change. It used to be measured from the entity's registry creation/modification date, which made just-disconnected devices look days old.
  • Disabled, failing or retrying integrations are no longer treated as dead: their entities go to To review.
  • Select all is now Select safe: it selects only safe entities that are not used anywhere.
  • Backups from Save & Delete are written to /config/orphan_cleaner_backups/ instead of the root of /config.
  • The orphan_cleaner_orphans_found event payload now includes category, reason and used_in for each entity, plus count_safe, orphan_devices and startup_grace.

Removed

  • The orphaned_timestamp detection method: that field exists only on entities that were already deleted, so it never matched anything.

Upgrade notes

  • Automations that call orphan_cleaner.delete_orphans without entity_ids will now delete fewer entities (only the safe ones). This is intended.
  • Existing backups in /config/orphan_cleaner_backup_*.json are not moved; you can move or delete them manually.

Don't miss a new orphan-cleaner release

NewReleases is sending notifications on new releases.