Document the automation package and test event validity

README gains the blueprint section: all four blueprints, their
inputs, the wiring table to the options-flow notification settings,
the celebration helper setup, event/sensor payload reference, and a
copy-pasteable example package. Tests assert every event trigger
references a real NestQuest event and no reminder is produced for an
absent child.
This commit is contained in:
2026-09-19 14:52:12 -04:00
parent 5092369d49
commit 3a2e6faa69
3 changed files with 135 additions and 1 deletions
+25 -1
View File
@@ -241,4 +241,28 @@ def test_afternoon_reminder_never_hard_codes_notify_target() -> None:
assert re.search(r"notify\.[a-z_]+", target_description), (
"the input description should show a placeholder example"
)
assert single_action(bp)["action"] == BlueprintInput("notify_target")
assert single_action(bp)["action"] == BlueprintInput("notify_target")
def test_afternoon_reminder_absent_child_regression() -> None:
"""The Feature 11 guardrail, stated as one regression test: no
reminder message is ever produced for an absent child."""
states = make_states(
sensors=[
TemplateState(
"sensor.nestquest_bob_quests_due_today",
"3",
{"child_name": "Bob", "child_id": 1, "present": False},
),
TemplateState(
"sensor.nestquest_bob_quests_remaining_today",
"3",
{"child_id": 1},
),
],
)
guard = afternoon_conditions(afternoon_reminder())[-1]
assert render(guard["value_template"], states=states).strip() == "False"
message = render(
notify_data(afternoon_reminder())["message"], states=states
)
assert "Bob" not in message