Command Line Switch possible documentation issue?

Hi,

I was trying to use Command Line Switch according to documentation. However, the example from the docs:

switch:
  platform: command_line
  switches:
    VLC:
      command_on: "cvlc 1.mp3 vlc://quit &"
      command_off: "pkill vlc"

doesn’t work on HASS 0.32.2, here is an error log:

16-11-13 13:55:19 homeassistant.bootstrap: Invalid config for [switch.command_line]: [VLC] is an invalid option for [switch.command_line]. Check: switch.command_line->switches->VLC. (See ?:?). Please check the docs at https://home-assistant.io/components/switch.command_line/

Does anyone know what is wrong and how to fix it, including the docs?

Try lower case

Thanks! That was the issue.
I guess that the documentation should be corrected because it is quite misleading :slight_smile:

https://github.com/home-assistant/home-assistant.github.io/pull/1436

I’ve never seen it posted but the unwritten rule is that all entity_ids should be lower case. I use lower case for everything that isn’t a data string (for notifications and such) and friendly names.