Fairly new to HA, and haven’t found a related post (or don’t know keywords well enough yet):
Here’s my technical question: how do I assign one input_boolean to the value of another input_boolean?
Use-Case: I have scripts for school-mornings, to help get kids up-and-going. Easy to run M-F, and even exclude holidays, days off, etc. But sick kids don’t follow that rule, nor conference days I forget, etc. I want to temporarily disable the automation for the NEXT day’s activities, aka, set and test for an input_boolean. The trick is, I don’t want to limit WHEN I can set that boolean… the night before, in the morning during breakfast, etc. But always for the NEXT day’s activity.
This really means I have 2 booleans: one for input_boolean.school_today (hidden), and one for input_boolean.school_tomorrow. At some point, I need to set Today == Tomorrow, then reset Tomorrow to some new default. I chose 3am as that cross-over point (later than I ever go to bed, earlier than I ever get up).
From ./automations/set_school_tomorrow_flag.yaml:
alias: Set School Tomorrow Flag
initial_state: true
trigger:
# at 3am
- platform: time
at: '03:00:00'
action:
# need help here... how do I:
- set: input_boolean.school_today == input_boolean.school_tomorrow
# this works fine:
- service: script.turn_on
entity_id: script.set_school_tomorrow_boolean
The script.set_school_tomorrow_boolean contains logic to determine M-F, holidays, scheduled days off, etc., and is working fine. But I don’t know how to assign one boolean to the value of another.
Or… is there another way to solve this requirement besides booleans?
Thanks!