Mapped switches : text ON/OFF visible ... sometimes?

Can’t figure out what’s the difference and why ON is displayed (which I don’t want to) but on the other Item it’s working just fine?

Switch  HeatingMode                 "Heating Mode"                  <none>      (gStoreChange)
Switch  HeatingSeason               "Heating Season"                <none>      (gStoreChange)
Switch item=HeatingMode		mappings=[ON="Manual", OFF="Auto"]
Switch item=HeatingSeason 	mappings=[ON="Winter", OFF="Summer"]

resulting in
this

that

Unfortunately, the BasicUI mapping is sometimes based on the Thing channel name :frowning:
Here is one of my motion sensors that shows ON & OFF in the logs.

image

Here is the Item channel for that. zwave:device:16b83f77166:node13:alarm_motion
Because the channel has the word alarm in it, the basic UI assumes it is an alarm switch rather than just a motion sensor binary switch.

A solution would be to make a virtual switch controlled by rules to mimic the real one & display the virtual switch. That is a “hacky” workaround though.

Some bindings supply ‘options’ via channel to Item, related to what might be discovered. Some don’t. (hence the difference)

At the moment you get default state display. You can suppress that if you wish by specifying an empty state format in the label. In Item, or in the optional overriding label= in sitemap.

Switch  HeatingMode                 "Heating Mode []"
2 Likes

Nah, it is because a (zwave) channel has force-fed ‘options’ to the Item concerned. You can see these extras if you look at the Item with REST API.

The UI behaviour in the case of a Switch widget automatically taking those options to mean it should display in “buttons” mode instead of “slide switch” mode has been a bone of contention.
So far as I know it has been resolved to display as a “slide switch” in future (unless of course you choose mappings= for yourself)

well both items are same and they don’t have any bindings, just dummy switch item
so … that’s why it’s weird.

that worked, thanks!

It won’t be random, I’ll bet one has picked up some baggage along the way.

Nevertheless, specific display directions avoid surprises :smiley:

1 Like

Please tick the solution post, thanks