I am have trouble with the following script in which I try to pass variables to it. The condition value_template line is giving invalid config. Any suggestions would be helpful, thanks…
offevents:
sequence:
- condition: template
data_template:
value_template: "{% if is_state( ~ newstate ~ , ~ senstate ~ ) %}"
- service: mqtt.publish
data_template:
topic: "mac/[num]/state"
payload_template: |
{{ states.sensor.e[num].state}}{{ states.sensor.time.state}}
SOLVED: this doesn’t give errors
offevents:
sequence:
- condition: template
value_template: '{{ [ newstate ] == [ senstate ] }}'