Hi Folks!
I am testing for hours now, and I don’t get it:
I have an intent_script (with snips.ai) and I am trying to switch TV states for an automation.
The intent_script section is like:
modus: #the intent name from snips via mqtt
speech:
type: plain
text: ‘schalte {{ modustv }}’ # modustv is the JSON special variable from mqtt - setting "sky, kodi, playstation…
action:
- service: input_select.select_option
data:
entity_id: input_select.tvscene
option: '{% if modustv == “kodi” %}Kodi{%endif%}'
The option line is my problem. I tried many many versions of if statements in many many variants, but I do not get my wanted “option” set the right way. If I try “option: Sky” manually everything works.
I try to read the intent script mqtt variable “modustv”, and set the right options, depending on the variable:
‘kodi’ should be set as option ‘Kodi’
‘sky’ should be set as option ‘Sky’
and so on
I need it case sensitive…
Please help. I think it must be so easy…
THANKS!