Nest notify payload fields under the action's data key

The modern HA action schema passes title and message to the notify
service only under data; fix the morning summary and afternoon
reminder blueprints and the test accessors accordingly.
This commit is contained in:
2026-09-19 14:45:50 -04:00
parent ad6f1768d7
commit 715aac994a
5 changed files with 70 additions and 54 deletions
+10
View File
@@ -82,6 +82,16 @@ def morning_action(bp: dict) -> dict:
return single_action(bp)
def notify_data(bp: dict, index: int = 0) -> dict:
"""Return a notify action's service ``data`` (title/message live
there in the modern HA action schema, not at the action's top level)."""
action = bp["actions"][index]
assert isinstance(action.get("data"), dict), (
"notify payload fields must nest under data:"
)
return action["data"]
def iter_strings(node: object):
"""Yield every string value in a parsed YAML structure, recursively."""
if isinstance(node, str):