Hello,
I’m trying to write a simple script that sends a message to my phone, the message being chosen in function of a field value.
Here is my script template:
> sequence:
> - if:
> - condition: template
> value_template: "{{ trigger }} == 'test' "
> then:
> - action: notify.mobile_app_sm
> metadata: {}
> data:
> message: "{{ trigger }} ok"
> else:
> - action: notify.mobile_app_sm
> metadata: {}
> data:
> message: "{{ trigger }} not ok"
> fields:
> trigger:
> selector:
> text:
> multiline: false
> multiple: false
> name: Trigger
> required: true
The problem is that I can’t make the if condition work, when I enter “test” on my field, I always receive the “test not ok” message…
How can I test the field value on this script?
Thanks in advance for the help,
Best regards,
Marc