Entity Duplicates Manager is a Home Assistant integration designed to identify, manage, and clean up duplicate entities in your Home Assistant instance. It helps keep your entity registry clean by finding entities with suffix patterns like _2, _3 that often occur when devices are re-added or integrations are reconfigured.
- Scan for Duplicates: Automatically scans your entity registry for potential duplicates based on configurable naming patterns.
- Interactive Card: A custom Lovelace card to view results, rename entities ("Fix"), or delete them directly from the dashboard.
- Configurable Filters:
- Suffix Depth: Control how deep to look for suffixes (e.g.,
_2to_5). - Exclude Patterns: Prevent specific entities or domains (like
sensor.uptime*) from being flagged.
- Suffix Depth: Control how deep to look for suffixes (e.g.,
- Safe Operations:
- Fix: Renames the duplicate entity to a desired ID (e.g., merging it back to the original name).
- Delete: Removes the entity from the registry.
- Open HACS in Home Assistant.
- Go to "Integrations" > "Explore & Download Repositories".
- Search for "Entity Duplicates Manager" (or add this repository as a custom repository).
- Click "Download".
- Restart Home Assistant.
- Download the
entity_duplicates_managerfolder. - Copy it to your
custom_componentsdirectory in Home Assistant. - Restart Home Assistant.
- Go to Settings > Devices & Services.
- Click Add Integration and search for "Entity Duplicates Manager".
- Follow the setup steps.
Add the custom card to your dashboard:
type: custom:entity-duplicates-manager-cardThe integration exposes the following services:
entity_duplicates_manager.scan_duplicates: Triggers a new scan based on current settings.entity_duplicates_manager.fix_entity: Renames an entity.entity_duplicates_manager.delete_entity: Deletes an entity.
You can adjust the scan behavior via the created entities:
number.suffix_filter_max: Max suffix number to scan for.text.exclude_patterns: Comma-separated list of wildcard patterns to ignore.