How may I write the below properly? I will send a REST event to HA and would like to run a script and select the outcome based on the value of a variable passed on to it. BTW, I still have yet to figure out how to write the REST as well.
light_scene:
sequence:
data_template:
entity_id: >-
{% if variable x = blue %}
trigger ifttt recipe b
{% elif variable x = green %}
trigger ifttt recipe c
{% elif variable x = orange %}
trigger ifttt recipe d
{% elif variable x = purple %}
trigger ifttt recipe e
{% else %}
script.noop
{% endif %}
Thank you. Below is what I have so far for the script. The data template code works, except I’m not certain how I enter ({% set x = ‘blue’ %}) into the rest url/call it. Also, please help fill in the blanks, or make code changes.