Two switches, different display

I have two Sonoff S26 Plugs flashed with Tasmota. The second one I have just installed and copied the first one making changes where appropriate. In Classic UI the first switch has no text next to it, i.e ON or OFF but the second one does.
I have configured the items and sitemap by files but the things are done in Paper UI.
My items file consists of the following;

Switch s26_1 “S26_1 On/Off” {channel=“mqtt:topic:3943a9f3:s26_1”}
Switch s26_2 “S26_2 On/Off” {channel=“mqtt:topic:6ac5f883:sonoffs26_2”}

and the relevant part of my sitemap is;

Frame label=“Living Room” {
Switch item=s26_1
Switch item=s26_2

Why are they displaying differently?

Every Item has a default state display format.
That default can be influenced by bindings.
Why yours come out different, I don’t know.
If you look at each Item JSON with REST API there will probably be a difference.

But if you don’t say what display you want, you get the default.
If you prefer to decide the display yourself, and not take the “lucky dip” …

Switch s26_1 "S26_1 On/Off [%s]" {

gives a textual state display

Switch s26_1 "S26_1 On/Off []" {

suppresses state display

Thanks rossko,

Once again you’ve come through with help when needed.
Not only have you given an answer you have pointed me, a beginner, to another openHAB feature that I am not familiar with yet, REST API.
I love openHAB, there is something new to learn at every corner and at 71 it helps to keep my mind active.


1 Like