Compare celebration stamps as whole entries; queue events

Child ids sharing a prefix no longer suppress each other (split and
compare entries for equality), and queued mode keeps a second child's
day-complete event from being dropped while the first notify runs.
This commit is contained in:
2026-09-19 14:50:59 -04:00
parent bf84793a1c
commit f6166f25d9
2 changed files with 26 additions and 5 deletions
@@ -60,7 +60,7 @@ blueprint:
filter:
- domain: input_text
mode: single
mode: queued
variables:
celebrate: !input celebrate
@@ -74,12 +74,17 @@ conditions:
- condition: template
value_template: "{{ celebrate | bool }}"
# Once-per-child-per-day dedupe: celebrate only when THIS child has
# no entry for today in the helper. An unset or missing helper reads
# as '' and celebrates.
# no equal entry for today in the helper. Entries compare as whole
# comma-separated tokens — a substring check would wrongly suppress
# child 1 after child 11 was celebrated. An unset or missing helper
# reads as '' and celebrates.
- condition: template
value_template: >-
{{ (trigger.payload.child_id ~ ':' ~ now().strftime('%Y-%m-%d'))
not in (states(last_celebrated_helper) or '') }}
not in ((states(last_celebrated_helper) or '')
.split(',')
| select('ne', '')
| list) }}
actions:
- action: !input notify_target