Im trying to make a multistate switch widget that looks like the one in sitemaps. Before you say it, yes iknow theres many threads on multistate switches. But i have not managed to find one where the state is displayed properly. It could be because of the massive ocean of multistate switch threads (that im joining now), but i atleast could not find it.
As you can see in the image below, i want my multistate switch widget to look similar to the sitemaps one. Where it displays a name, then 3 buttons. The button where the command is the same as current state has another collor. (In this case the value is 2, and since the Auto buttons command is 2. It has a different collor)
There is a few workarounds i can think of, but wont work in this case. Since Openhab is not the only place where this variable can be set. Theres two other devices that can publish to this item on mqtt.
I found a way to make it work by using the fill option(as there is no color/background option for the oh-button).
Only problem now is that the buttons are so small, compared to the label card. I tried setting large: true, but did not change anything.
I think this is the best i can do, only thing thats bugging me out is that theres no gap between the widgets. But thats another issue.
Atleast it works now. For those that are interested, this is how it works:
You give it a Title, mode item (0-2 number item), and a state item (in my case this is the state of the light group.(Switch))
Light bulb icon to the left is yellow if the state item is on, and grey if not. The buttons sends 0, 1, 2, and glows orange if the state is the same as their command. In the picture below, all 3 of them is in auto mode. So the Auto button lights up (value of the “mode” item is 2)