That’s eaxactly what I trying to get. It works now but I don’t see the icon change. the switch is to bypass automation. It could be possible to have the ligt on without the use of the toggle.
As mentioned… use “Colour icons based on state?”
activate it in the entities card configuration.