Switch Element presentation via Basic UI

Hi all,
I’m on OH3.1 trying to create a switch item that unlocks the door.

It should look similar to this TV channel item, only in my case a simple “UNLOCK” button.

When i try this…

Switch item=Wimberg_DoorUnlock mappings=[ON="Unlock"]

the result looks as follow (which is OK , but i would like to not see the state, meaning the ON…no status at all should be presented…like above for the radio channels…
BUT what did i set wrong,…


Thanks a lot

Your Item has a state presentation of [%s] set somewhere, maybe in the label if you define it from file or in the pattern metadata defined from UI.

But you can override that in sitemap widget.

Switch item=Wimberg_DoorUnlock label "My lock []" mappings=[ON="Unlock"]
1 Like

As far as i remember the default presentation is somehow connected with theitem and the bindig. so the representation is not consistant. simetime it is like shown with other items it is different.

So the best idea is to do it for all items always in the same manner.

Thanks to both of you.

First, the [] helped a lot and it works as intended. Still its strange - i before did use [%s] but removed it every where and even restartet the whole system to clear any cache…but still its present, i checked item, thing, sitemap file but nothing inside anymore, and still it does behave like before…

Maybe this can be explained by Tom’s insight.

In the end it works and in never thought of simply using a [ ]…Cheers