You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This filters called services/actions out of the entity-reference repair path before unknown entities are reported.
Home Assistant can expose action names such as notify.my_phone through referenced_entities. Those action names look like entity IDs, but they are service calls, not entities. Spook now subtracts the called services from the automation and script config before filtering for unknown entity references.
Spook 5 could report notify actions and notify groups as unknown entities in automations and scripts. That created noisy repairs for valid action: notify.* calls.
How has this been tested?
uv run pytest tests/ectoplasms/automation/repairs/test_unknown_entity_references.py tests/ectoplasms/script/repairs/test_unknown_entity_references.py tests/test_entity_filtering.py -q
uv run ruff format --check custom_components/spook/entity_filtering.py custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py custom_components/spook/ectoplasms/script/repairs/unknown_entity_references.py tests/ectoplasms/automation/repairs/test_unknown_entity_references.py tests/ectoplasms/script/repairs/test_unknown_entity_references.py
uv run ruff check --output-format=github custom_components/spook/entity_filtering.py custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py custom_components/spook/ectoplasms/script/repairs/unknown_entity_references.py tests/ectoplasms/automation/repairs/test_unknown_entity_references.py tests/ectoplasms/script/repairs/test_unknown_entity_references.py
uv run --with pre-commit pre-commit run pylint --files custom_components/spook/entity_filtering.py custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py custom_components/spook/ectoplasms/script/repairs/unknown_entity_references.py tests/ectoplasms/automation/repairs/test_unknown_entity_references.py tests/ectoplasms/script/repairs/test_unknown_entity_references.py
Screenshots (if appropriate):
Not applicable.
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ccab7639-1985-4b21-ba68-8ba57eb01046
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
✨ Finishing Touches🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch frenckatron/fix-notify-entity-repair-1331
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bugfixInconsistencies or issues which will cause a problem for users or implementors.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This filters called services/actions out of the entity-reference repair path before unknown entities are reported.
Home Assistant can expose action names such as
notify.my_phonethroughreferenced_entities. Those action names look like entity IDs, but they are service calls, not entities. Spook now subtracts the called services from the automation and script config before filtering for unknown entity references.Motivation and Context
Fixes #1331.
Spook 5 could report notify actions and notify groups as unknown entities in automations and scripts. That created noisy repairs for valid
action: notify.*calls.How has this been tested?
Screenshots (if appropriate):
Not applicable.
Types of changes
Checklist