I am trying to add conditions to a automation action and am wondering whether this should work or not (obviously depending on the scripts being right etc). Thanks in advance!
Try instead value_template: "{{ states('sensor.sensor1') == 'Dry'}}"
Also note that if your first condition under the action block is not met, your script/automation stops, it does not just skip the next action and keeps running.
On that basis your service: script.update_next_runtime will never run
Thanks for that. Ohh I see… I did have a play with using If /else statements but I couldn’t find a way to add in the data_template for cycle 2 bit.
Is there a way to skip the service if the condition is not met and move to the next one?
yes, just call 2 separate automations/scripts that would have the condition built-in and would run an action if the condition is true. OR
have a service_template that checks the sensor.sensor1 value and runs an action accordingly:
Thanks. I’m still not sure how that’s supposed to work.
Just add a condition / service_template to your script.
so 1 automation with service_template to select the script, and the script has a service_template to selec the cycle?