Ignore notify targets in automation entity checks#1283
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 (2)
📝 WalkthroughWalkthroughAutomation entity-reference scanning now excludes ChangesNotify service target exclusion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 #1283 +/- ##
==========================================
+ Coverage 62.72% 62.82% +0.09%
==========================================
Files 124 124
Lines 3147 3155 +8
Branches 403 404 +1
==========================================
+ Hits 1974 1982 +8
Misses 1126 1126
Partials 47 47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Description
Ignore
data.targetvalues on notify actions when extracting entity references from automation action data.Notify targets are service-specific notification targets. They are not Home Assistant entity references, even when they look like
notify.*. Other action data values are still scanned, including templates, and non-notifytargetvalues keep the existing behavior.Motivation and Context
Fixes #1253.
Spook could keep reporting an old notify target as an unknown entity after an automation had already been updated. The scanner was treating the notify action's
data.targetas an entity ID, which made the repair noisy for mobile app notification targets.How has this been tested?
ruff check custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py tests/ectoplasms/automation/repairs/test_unknown_entity_references.pyruff format --check custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py tests/ectoplasms/automation/repairs/test_unknown_entity_references.pypylint custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py tests/ectoplasms/automation/repairs/test_unknown_entity_references.pypytest -q tests/ectoplasms/automation/repairs/test_unknown_entity_references.pypytest -qScreenshots (if appropriate):
Not applicable.
Types of changes
Checklist