Hi Everyone,
this just drives me crasy, I just dont find why it is not working. I cannot set the preset mode from template. Setting in single line or multi works (below), but when I try to set it from a template the script runs but nothing happens.
Thanks for any help.
script_climate:
alias: Set climate phase
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.nappali
preset_mode: >-
{% if (now().isoweekday() > 0) %}
none
{% else %}
away
{% endif %}
script_turn_on_climate:
alias: Turn on the climate
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.nappali
preset_mode: none
script_turn_off_climate:
alias: Turn off the climate
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.nappali
preset_mode: >-
away