sort the entity list in the unknown entity repair message for dashboards#1163
sort the entity list in the unknown entity repair message for dashboards#1163besteru wants to merge 1 commit intofrenck:mainfrom
Conversation
📝 WalkthroughWalkthroughModified the construction of translation placeholders for unknown entities to use sorted iteration when building the entities list for issue creation. This ensures deterministic ordering in translation strings while log output remains unaffected. Lines changed: +1/-1. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py (1)
89-89: Consider sorting the log output for consistency.The log output still uses unsorted iteration over
unknown_entities. For consistency with the repair message and to make log output deterministic (helpful when comparing logs across runs), consider sorting here as well.♻️ Proposed fix
- ", ".join(unknown_entities), + ", ".join(sorted(unknown_entities)),
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py
🔇 Additional comments (1)
custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py (1)
77-77: LGTM! Sorting improves readability.The addition of
sorted()ensures deterministic, alphabetically ordered output in the repair message, making it easier for users to visually parse and identify unknown entities. Since sets have non-deterministic iteration order, this change is a clear improvement.
|
Could someone with write access add the "enhancement" label to this PR? |



Description
Sorted the list of unknown entities printed in the repair message for Lovelace dashboards.
Related to #1161
Motivation and Context
Cosmetic change - it is easier to parse the list of unknown entities if they are sorted. It is easier to visually inspect the list and decide which need to be updated/corrected.
How has this been tested?
Ran on Home Assistant Container, Core 2026.1.0, Frontend 20260107.0.
Change is minimal and affects only message printed in the repair text.
Screenshots (if appropriate):
Types of changes
Checklist