fix: action call data takes precedence over scenario and delivery data#70
Open
lollox80 wants to merge 3 commits intorhizomatics:mainfrom
Open
fix: action call data takes precedence over scenario and delivery data#70lollox80 wants to merge 3 commits intorhizomatics:mainfrom
lollox80 wants to merge 3 commits intorhizomatics:mainfrom
Conversation
- envelope_data now built in correct priority order: delivery.data < scenario.data < action_call.data < target.data - action call overrides (volume, message_template, etc.) now correctly override scenario-level data (e.g. late_night volume=0 whisper) - ATTR_CHANNEL_MESSAGE added to const.py and imports - ATTR_SPOKEN_MESSAGE removed (obsolete, replaced by channel_message)
9929501 to
6d9d495
Compare
ATTR_SPOKEN_MESSAGE was removed from imports when ATTR_CHANNEL_MESSAGE was added, but INTERNAL_DATA_KEYS still references it. Add both imports.
1e3db91 to
11b0a5c
Compare
for more information, see https://pre-commit.ci
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes two bugs in notification delivery override handling and corrects
the priority order of envelope_data construction.
Problems
Bug 1 — override enabled:true ignored when scenario disables delivery
If a scenario disabled a delivery via
enabled: false, an explicitenabled: truein the action call had no effect. The delivery wassilently skipped.
Bug 2 — person_id in delivery target override not resolved
When a per-delivery target override used
person.*references, theywere not expanded to
mobile_app_*device targets. The deliverywas sent to no targets.
Bug 3 — scenario data overrides action call data
envelope_datawas built with scenario customizations applied last,meaning scenario-level keys (e.g.
volume: 0.0,message_template)silently overrode explicit values passed by the caller. For example,
passing
volume: 0.5in a delivery override had no effect whenlate_nightscenario setvolume: 0.0.Fix
Priority order (lowest → highest):
Fix
Priority order (lowest → highest):
delivery.data → scenario.data → action_call.data → target.dataoverride_enable_deliveriesnow excluded fromall_disabledresolve_indirect_targetsnow applied to override targetTesting
Tested on Home Assistant OS 17.1 / Core 2026.3
enabled: trueoverrides scenarioenabled: falseperson.lorenzoresolves to all mobile_app_* devicesvolume: 0.5in action call overridesvolume: 0.0from late_night scenario