Command Line Switch Icon no longer displays as a toggle switch

I just upgraded from 0.36.1 to 0.37.0 and now all of my command line switches, which used to display in the interface as a standard toggle switch, are now displaying as two seperate lightning bolt icons, one for on and one for off. There is no reference to any changes on the command line switch in the description of the 0.37.0 update, so why has this changed?

How can I get the toggle switch to display again for my command line switches?

UPDATE

I noticed that one of my command line switches was still displaying the correct toggle in the interface, so I checked its customize settings at it had the following option:

assumed_state: false

I then added that option to all of my other command line switches and now they are all displaying with the toggle again. I don’t know what changed between 0.36.1 and 0.37.0 to require this workaround.

Also, I am not sure I like this workaround, because it is assuming all of my switches will be “off” at bootup, so if the device happens to be on and I reboot home assistant, I assume it will turn my device off instead of simply displaying the toggle in the current state of the device, so overall, I am not sure this is the workaround I want.

Any info on how to fix this would be greatly appreciated.

I fixed the bug in the command line switch: https://github.com/home-assistant/home-assistant/issues/5628
The state of a command_line switch is unknown if command_state is None, so therefor assumed_state is sat to false

1 Like

@Danielhiversen You beat me to it, I had just looked up your PR and issue on Github :smile:

1 Like

I don’t know how I missed that on github… sorry guys, also, I misunderstood the use of “assumed_state” and thought it was setting my switch to off at bootup… Thanks to both of you for the quick response.

I need to do a more thorough search of github issues next time :slight_smile:

1 Like

I do agree calling the option assumed_state is a bit misleading and also used to think it did what initial_state does for automations.