Changing entity icon disables state color change

I have a few zwave switches that control lights, and to make it look uniform in the Lovelace UI I’ve set the icon on the entities in the glance card.
- entity: switch.balcony_outside_light_switch
name: Balcony
icon: mdi:lightbulb
When I do this however the icon no longer changes color based on the theme.
Screenshot%20from%202018-08-10%2009-03-49
If I remove the icon entry so that it uses the original icon the color change works.
Screenshot%20from%202018-08-10%2009-02-55

Is there any way to fix this? I’ve tested this with all themes, including the default.

It seems that if I change the icon of the device under customize: then state change will be reflected in the icon.

Yes that is true. Still, this is most likely an oversite/bug with the lovelace UI. It may get fixed in the future. If you are feeling up to the challenge, you could write a PR to have it fixed.