Basic UI : disable state colors for switch?

Hi, new to Openhab, installed v4 , i added a switch like below, it controls a volume , its actually an mqtt switch with no state…
But seems in OpenHab Basic UI, there is always a state if i press the up / down arrow (pink color)

How can i remove the color of the state there , so they both have same color, and not representing a state?

Switch icon=mediacontrol label="Badkamer Volume" item=volume_zone2 mappings=[ON="▲", OFF="▼"]

Hi,
how do you use a switch for volume?
I use dimmer items for volume and in sitemaps I use setpoint or slider then..

Greets

its an mqtt switch , turning on, sends 1 volume up, turning off, sends 1 volume down

oh wow.. this is weird.

You can use 2 proxy switch items.. 1 for volume up, 1 for volume down.
then use a rule to control your mqtt item..

in the sitemap you could use the 2 proxy items with press and release behavior..

press = ON, release = OFF

with every ON press your rule sends a command to the mqtt item.

Switch icon=mediacontrol label="Badkamer Volume" item=proxyvolup mappings=[ON:OFF="▲"]
Switch icon=mediacontrol label="Badkamer Volume" item=proxyvoldown mappings=[ON:OFF="▼"]

this are 2 rows then in the sitemap.

Or you use a proxy number item and use a setpoint in sitemap..
your rule: If new number is higher then previous send on, else send off..
this is also possible… I think I would prefer this way…

greets

i have now created an expire timer, so the state goes back to none after 1 sec:

it now looks like below, thats what i wanted :slight_smile:

it only gets pink when pressed, but goes back to default after 1 sec…

good enough for me :slight_smile:

Btw, where are those colors defined? is that somekind of theme?

ok, that fine..
the color, i dont know, sorry..

ok no problem, one last question, is there somekind of backup addon to backup sitemaps, items, things ?

there is a backup function in openhab-cli
you’ll find it if you google. :wink:
I copy the folder /etc/openhab from time to time per ssh or network share.

ah, i was looking for something in the UI itself, since i dun it on a docker instance

i have these folders mounted

i can copy over the .things file, cause i created them with yaml

conf\things

but what about the rest, where is the config located about items/sitemaps/… created in UI itself?

i copy the conf folder..

but the things, items, sitemaps that are created via UI you have to backup with the backup function of openhab itself.
i dont know how its done in a docker installation..

Everything is stored in userdata/jsondb.

As a general rule, if you mount folders into a container, the reason for doing so is that is the stuff that contains your data that needs to be preserved. So in general those are the folders you want to back up.

Buttons are stateful for such a sitemap element.
But that’s an idea for enhancement.
Only buttons in a button grid can be either stateful or stateless.

1 Like