Repository navigation
Enrich unknown entity issues across all repairs - #1369
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughSix repair modules across group, lovelace, proximity (two files), scene, and template ectoplasms are updated to import and use ChangesUnknown Entity Placeholder Unification
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1369 +/- ##
==========================================
+ Coverage 81.85% 81.88% +0.02%
==========================================
Files 135 135
Lines 3736 3742 +6
Branches 471 471
==========================================
+ Hits 3058 3064 +6
Misses 587 587
Partials 91 91 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR is a follow-up to #1368. It replaces the inline "\n".join(f"- \{entity_id}`" ...)placeholder construction in the remaining unknown-entity repairs with the sharedasync_describe_unknown_entities` helper, so that dashboards, scenes, groups, template helpers, and both proximity repairs now carry the same enriched context (deleted-on/provided-by, or "did you mean") as the automation and script repairs. The change is purely cosmetic to the issue text; no detection behavior changes.
Changes:
- Import and call
async_describe_unknown_entities(self.hass, sorted(unknown_entities))in six repairs (template, scene, lovelace, group, proximity tracked entities, proximity ignored zones). - The scene, group, and both proximity repairs now sort their entity list, making the placeholder output deterministic (previously set-iteration order).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
ectoplasms/template/repairs/unknown_entity_references.py |
Uses shared helper for entities placeholder |
ectoplasms/scene/repairs/unknown_entity_references.py |
Uses shared helper; now sorts entities |
ectoplasms/proximity/repairs/unknown_tracked_entities.py |
Uses shared helper; now sorts entities |
ectoplasms/proximity/repairs/unknown_ignored_zones.py |
Uses shared helper for zones placeholder; now sorts |
ectoplasms/lovelace/repairs/unknown_entity_references.py |
Uses shared helper for entities placeholder |
ectoplasms/group/repairs/unknown_members.py |
Uses shared helper; now sorts entities |
I verified the helper's signature and behavior, confirmed all six call sites pass the correct arguments, checked that proximity ignored zones are entity IDs (zone.*) so the enrichment is semantically valid, and confirmed no inline-bullet joins remain in the repairs. The changes are mechanical, consistent, and complete.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Description
Follow-up to #1368. The remaining repairs that build their own entity placeholder now use the shared
async_describe_unknown_entitieshelper instead of an inline bullet join: Lovelace, scene, template helpers, group members, and both proximity repairs (tracked entities and ignored zones).Every unknown-entity issue across Spook now carries the same context:
(deleted on <date>, was provided by `<integration>`)or(did you mean `<entity>`?), not just automations and scripts. Mechanical one-line swap per repair plus the import; no behavior change beyond the enriched text.Motivation and Context
Consistency: the enrichment that landed for automation and script entity issues is just as useful on dashboards, scenes, groups, template helpers, and proximity, so all of them get it.
How has this been tested?
The enrichment engine is covered by its own tests (#1368). Each repair's existing tests continue to pass: with no deleted entry or close match, the helper produces the same plain bullets as before, so the placeholder assertions are unchanged. Full suite passes (593 tests), ruff, pylint (10.00/10), and all prek hooks pass.
Screenshots (if appropriate):
Types of changes
Checklist