EDIT: It was a sensor issue, the script actually is working.
Hi all,
I have a script in which I’m trying to turn ON or OFF an input boolean depending on the state of a binary sensor.
Which is the correct syntax? cause I’ve tried different solution found on the forum but they all doesn’t work.
This is the last one I tried
...
- service_template: "{% if is_state('binary_sensor.soil_1' , 'on') %} input_boolean.turn_on {% else %} input_boolean.turn_off {% endif %}"
entity_id: input_boolean.soil_01
...
thanks