Custom icon for switch doesn't toggle the color like lights

I have 2 zigbee devices which are auto detected in home assistant. One is a switch and the other is a dimmer. For the dimmer there is a default ‘lightbulb’ icon. For the switch it is the ‘flash’. Since my switch is toggeling a light I wanted to have the ‘lightbulb’ for my switch, too. So I created customize.yaml and entered the following:
icon: mdi:lightbulb

The lightbulb icon is displayed, everything is fine. Until I switch it on. The dimmer turns the icon to yellow if its on (or fades it when dimmed), but the switch not. How can I configure the switch to change the icon color when it is turned on?

Thanks in advance

Just a guess, but you’re using the latest 0.105+ release? Or, because you’re new, this could be your first release!

Either way, this behavior just changed in the latest release.

The entities card no longer changes the colors of icons based on states, except for lights.

So, that is why we disabled it, by default, for all entity types, except lights. However, we did add a new option: state_color . Using this option, you can decide if you want to old behavior back, add it to more entity types or maybe even disable it for lights too!

Because it is so new, most examples you find online will show their states changing colors and you’ll be wondering why yours arent.

Also, before you ask, changing the icon to a lightbulb is not the same as changing an entity to a light!

So, add “state_color: true” to the lovelace config for that card for each card you want this to be true on.

Thanks for your quick reply. In fact I’m new to home assistant and this really helped me out.
Is it better to change the switch to a light when its actually a light? Or should I go with the ‘state_color’?

My particular problem is that I really want the state of switch icons to change in the Scenes configuration area. Whenever I go to double check how things are set in a scene, I have to manually click on every switch to see how its set. If the switch icons behaved like the light icons, I wouldn’t have to do that.

Or, if the device list indicated how the device was set within the scene, I wouldn’t have to click on each one to get an overview of the scene?

Unless I’m missing something?