Solved. Adding "assumed_state: false" to command line switch breaks entity

I have the following working command line switch defined in my configuration.yaml:


  • switch:
    name: Back Patio Floodlight
    command_on: “curl -g -v --digest ‘http://[user]:[password]@[0].Type=1&info[0].IO=1’”
    command_off: “curl -g -v --digest ‘http://[user]:[password][email protected]/cgi-bin/coaxialControlIO.cgi?action=control&channel=1&info[0].Type=1&info[0].IO=0’”

It works fine but the switch is displayed as a lightning bolt instead of a toggle. I’m trying to change that.

According to the HA documentation:

assumed_state boolean (Optional, default: true)

For switches with an assumed state two buttons are shown (turn off, turn on) instead of a switch. By setting assumed_state to false you will get the default switch icon.

When I add “assumed_state: false” to the above configuration it does not change the switch icon, it breaks the entity instead.

I’ve looked at numerous forum posts about this and other people have used the assumed_state entry successfully but I have been unable to get it to work. Has a breaking change been introduced in a recent HA release?

Any suggestions would be appreciated.

HA System info:
Debian 12
Core 2024.3.1
Supervisor 2024.03.0
Frontend 20240307.0

If belongs in your configuration.yaml file in the section that handles manual customization of entities, namely in the customize key under the homeassistant key

      assumed_state: false


Manual Customization

That did it and ended hours of Google searches and fooling around with the yaml. Thanks much for responding.

1 Like

You’re welcome!

Please consider marking my post above with the Solution tag. Only you, the author of this topic (or a moderator) can do that. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.