Command Line Switches - Help

My set up works perfectly on the previous version 0.27
After upgrade to 0.28, my command line switches stopped working and the error message below appears

16-09-12 13:16:19 homeassistant.bootstrap: Invalid config for [switch.command_line]: [Debuan_Server] is an invalid option for [switch.command_line]. Check: switch.command_line->switches->Debuan_Server

Here’s the switch config

- platform: command_line
      command_on: "wakeonlan E8:39:35:2D:E8:FD"
      command_off: "ssh [email protected] poweroff"
      command_on: "ssh [email protected] service plexmediaserver start"
      command_off: "ssh [email protected] service plexmediaserver stop"
      command_on: "sudo service transmission-daemon start"
      command_off: "sudo service transmission-daemon stop"

I am lost! help!

Instead of Debian_Server, Plex_Server, and Transmission _Server use debian, plex, and transmission for the names.

Then add the value template
value_template: '{{ states.switch.debian.state }}'
Do this for each one replacing the entity.

That worked for me.

I just tried (without the optional value template) no difference unfortunately

16-09-12 14:06:16 homeassistant.bootstrap: Invalid config for [switch.command_line]: [Debuan] is an invalid option for [switch.command_line]. Check: switch.command_line->switches->Debuan.

same error message

Use debuan instead of Debuan.

1 Like

Im getting this as well, no command line switches are working

@Carl_Dickson @kwetiaw

I apologize I am on mobile and should be asleep. I am posting a screen shot of what worked for me after a good battle following the update last night.

The comments make it look bad too.

@Ptp that actually worked, lowercase on the identifier (in my case debuan instead of Debuan)

Thanks for your help. now you can safely power off and get some sleep!

1 Like

I had the same problem and was told today in the chat that HASS used to covert all switch identifiers to lowercase letters but no longer does so in 0.28. Uppercase letters in those identifiers will cause errors from now on.


great to know. I will check the remainder of my settings soon.

im still getting the error today, ive changed to lower case…

homeassistant.bootstrap: Invalid config for [switch.command_line]: [lcd 2 pending] is an invalid option for [switch.command_line].

I finally got it working;

oncmd now is command_on
offcmd now is command_off

also you cant have spaces in the names

lcd 2 pending has to be lcd_2_pending

I dont mind changes, but they could tell us…


It was not specifically stated that it changed but they gave us an example in the 0.28 release notes.
It’s at the very bottom.

True, didnt see that, just a shame a release breaks old formatting.

will check that section more closely on releases.


Glad to see this thread. Helped me.