v1.2.4 - Auto-Cleanup Old Entities
New Feature
Added automatic cleanup of stale/unused entities from previous versions.
How It Works
When the integration loads (on HA restart or integration reload):
- Builds a list of valid entity unique IDs from active coordinators
- Compares against all entities registered to this config entry
- Automatically removes entities that don't match current structure
- Logs each removal to Home Assistant logs
What Gets Cleaned Up
- Duplicate entities from version upgrades
- Old entity formats that have been replaced
- Orphaned entities from removed features
Safety Features
- Only removes entities with roborock-specific patterns
- Validates against active coordinator data
- Logs every removal for transparency
- Won't remove entities from other integrations
Benefits
✅ No more duplicate entities
✅ Clean entity registry after updates
✅ No manual cleanup needed
✅ Automatic maintenance on each reload
Usage
Simply reload the integration or restart Home Assistant, and stale entities will be automatically removed. Check the logs to see what was cleaned up:
Removing stale entity sensor.roborock_q10_s5_2 (unique_id: status_ABC123)
Full Changelog: v1.2.3...v1.2.4