Hi all, having a problem with script syntax, probably something really basic that I’m missing but I can’t work it out.
I am trying to build a script to trigger my Broadlink RM Mini to turn my TV on as follows:
script:
tv_lr_on:
sequence:
- service: switch.toggle
data:
entity_id: switch.tv_lr
My switch is set up as follows:
name: Living Room Broadlink
platform: broadlink
host: 192.168.0.154
mac: 'B4:43:0D:CC:25:1C'
switches:
tv_lr:
friendly_name: "Living Room TV Power"
command_on: 'JgCMAJOVEjcSORE3EhMSFBAVEBQSExE4EjcSORETERQSExEUEBQSExI3ERURExEUERMRFRETEjcSFBA4EjgROBI4EjcTOBAABgKTlRI3EjgSNxIUERMRFBEUERQROBI3EjgRExMTERQRExEUERMTNxITERQRFBEUERMSExE5ERMROBM3EjcSOBM2EzcSAA0FAAAAAAAAAAAAAAAA'
command_off: 'JgCMAJOVEjcSORE3EhMSFBAVEBQSExE4EjcSORETERQSExEUEBQSExI3ERURExEUERMRFRETEjcSFBA4EjgROBI4EjcTOBAABgKTlRI3EjgSNxIUERMRFBEUERQROBI3EjgRExMTERQRExEUERMTNxITERQRFBEUERMSExE5ERMROBM3EjcSOBM2EzcSAA0FAAAAAAAAAAAAAAAA'
When doing a config check I get the following:
expected a dictionary for dictionary value @ data['script']['tv_lr_on']. Got None. (See /config/configuration.yaml, line 105). Please check the docs at https://home-assistant.io/components/script/
2017-08-01 09:40:10 ERROR (MainThread) [homeassistant.setup] Setup failed for script: Invalid config.
I am able to send packets to the TV to toggle it on and off (the packet data is identical for both) and can do the same from the GUI, so I’m guessing it’s my script syntax. Any ideas?
(I have already checked https://home-assistant.io/components/script/ and https://home-assistant.io/docs/scripts/)