Hello, I want to do this automation, but it gives an error and in the template editor the actions are not executed and I write them blank, as if it were a text.
I wonder if you can use the if and else options in an automation? so as not to have to do an automation to activate and another to deactivate. Thank you
{% if ((states.sensor.temperatura_acs.state | float) > ((states.input_number.temp_acs_minima.state | float))) %}
action:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.freeds_pwm_aut_man
- switch.freeds_pwm_on_off
{% else %}
action:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.freeds_pwm_aut_man
- switch.freeds_pwm_on_off
{% endif %}