Hello ,
I have an alarm clock with 7 toggles named:
input_boolean.sk1_monday_toggle
input_boolean.sk1_tuesday_toggle
input_boolean.sk1_wednesday_toggle
input_boolean.sk1_friday_toggle
etc…
Now i want to check in the automation condition if the toggle of the present day is set.
this is what i have so far:
Trigger:
platform: template
value_template: >-
{% set dow = now().strftime("%A")|lower %} {% set input =
"input_datetime.sk1_"~dow~"_alarm" %} {{ now() >= today_at(states(input)) }}
alias: Trigger op Date time variabelen
(this seems to work)
condition:
- condition: state
entity_id: input_boolean.sk1_toggle
state: "on"
- condition: template
value_template: >-
{% set dow = {% now().strftime("%A")|lower %} {{
states('input_boolean.sk1_'~dow'_toggle')}} == 'on'
i have 2 conditions the main toggle alarm clock off/on
and one for each day.
But what is the correct syntax for the day toggle ?
can some on plz. help me with this ?
Gr.