This intent doesn’t execute script and doesn’t pass the variables, what is wrong with this code? and how can i pass the variables to execute the script.
speech:
text: Voy a {{ Direccion }} la {{ NCortinas | replace('_', ' ') }}
action:
service: script.turn_on
data_template:
entity_id: script.{{ Direccion }}_cortina
variables: >-
{%- if Direccion == "abrir" -%}
set_start: '0'
set_stop: '50'
full_excursion: '27'
travel_pct: '50'
direction_travel: 'ABRIR'
travel_time: '14'
c_nivel: NCortinas
{%- elif Direccion == "cerrar" -%}
set_start: '50'
set_stop: '0'
full_excursion: '27'
travel_pct: '50'
direction_travel: 'CERRAR'
travel_time: '14'
c_nivel: NCortinas
{%- endif -%}
Thanks