I’m trying to automate my magicblue bulbs but I’m having some trouble with the following value_templates, both templates work exactly as I wish them to work if done separately but when put together as below I get an error of duplicate key: “value_template”, so my question is, is there a workaround or is this not going to work at all? Thanks in advance
Hmm I get …
17-05-07 16:21:31 ERROR (MainThread) [homeassistant.config] Invalid config for [shell_command]: [set_MBBulbRedBot_setHexCol] is an invalid option for [shell_command]. Check: shell_command->shell_command->set_MBBulbRedBot_setHexCol. (See /home/homeassistant/.homeassistant/configuration.yaml, line 289). Please check the docs at https://home-assistant.io/components/shell_command/
17-05-07 16:21:31 ERROR (MainThread) [homeassistant.setup] Setup failed for shell_command: Invalid config.
17-05-07 16:21:32 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform template
Using …
set_MBBulbRedBot_setHexCol: ‘sudo magicblueshell -m C1:40:5D:6E:A3:E8 {{ value }}’
Another thing I notice is that you are using single quotations around the shell_command.set_MBBulbRedBot_setHexCol. This may not work as intended since you are also using single quotes around your ‘set_color #FFFFFF’ command. Maybe try surrounding your shell_command script with double quotes instead of single quotes?
set_MBBulbRedBot_setHexCol: “sudo magicblueshell -m C1:40:5D:6E:A3:E8 {{ value }}”
Can anyone see what’s wrong with this shell command? set_MBBulbRedBot: 'sudo magicblueshell -m C1:40:5D:6E:A3:E8 "set_color {{ states.input_select.magicbluecolours.state }}"'
I’ve tried every combination of double and single quotes but I just can’t seem to get it right, thing is that the command has to have either single or double quotes round the set_color {{ states.input_select.magicbluecolours.state }} part of the command.
17-05-09 00:12:17 ERROR (MainThread) [homeassistant.config] Invalid config for [shell_command]: [set_MBBulbRedBot] is an invalid option for [shell_command]. Check: shell_command->shell_command->set_MBBulbRedBot. (See /home/homeassistant/.homeassistant/configuration.yaml, line 291). Please check the docs at https://home-assistant.io/components/shell_command/
17-05-09 00:12:17 ERROR (MainThread) [homeassistant.setup] Setup failed for shell_command: Invalid config.