Hi,
Sorry to bother, but I skimmed the forum without finding a complete solution to my problem.
I have defined an mqtt sensor which has 0, 1, 2 and 4 as possible values. The sensor is defined in configuration.yaml
I created a button card to display the value and to change it (through mqtt publish). The icon I use is mdi:traffic-light. Publishing script works fine. But I can’t figure out how to have the icon color changed according to the status. I tried multiple solutions, but can’t get it to work. Also, I would like that the message in the button card (activated with show_state: true) displays a derived value rather than the numeric one.
Could anyone help me with that? Provide a working solution (or pointer to) including where to integrate it (in a config file? elsewhere?)
Thanks a lot
Jean-Noël