I wrote my own directv component which works with scripts and automations, now working on alexa intents
I am getting the following parse error on a template using a dictionary:
ERROR:homeassistant.util.yaml:while parsing a flow mapping in configuration.yaml column 30 expected ‘,’ or ‘}’ but got [’] in configuration.yaml column 173
ChangeChannelIntent:
action:
service: media_player.play_media
data_template:
entity_id: media_player.office_dvr
media_content_type: channel
media_content_id: {{ {"fox":"002","nbc":"004","abc":"007","cbs":"062","cw":"050","disney":"290","nick":"300","cnn":"212","fox news":"360","tnt":"245","tbs":"247"}[Channel] }}
speech:
type: plaintext
text: OK
If I hard code the media_content_id to a number it works, just not the dictionary
I am just not a jinja2 guy, but online parser i tried outputs the right number when i specify the Channel variable so I am at a loss.