[SOLVED] Switch - Text displayed next to the buttons

  • Platform information:
    • Hardware: _Raspi3+
    • OS: Openhabian 1.4 / Openhab2.4(release)

I’ve got a strange thing which drives me nuts and i do not see the solution or the error.
I do have the problem that the state of a switch item is displayed in BasicUI next to the buttons:

I do know that this happens if you have an item with a placeholder in the label like:

Switch myItem "Some switch label [%s]" mappings=[ON="An", OFF="Aus"]

But my items look like the following:

//those items have the problem in the UI
Switch Valve_Garden_RaisedBed	"Ventil Hochbeet"		<faucet>	(gPersistence)	["Switchable"]	{channel="mqtt:topic:878d394a:Power2",  expire="2h,command=OFF"}
Switch Valve_Garden_Right		"Ventil Garten rechts"	<faucet>									{channel="mqtt:topic:878d394a:Power1"}
Switch Plug_RaisedBed_1			"Steckdose Hochbeet 1"	<poweroutlet>								{channel="mqtt:topic:878d394a:Power3"}   
Switch Plug_RaisedBed_2			"Steckdose Hochbeet 2"	<poweroutlet>								{channel="mqtt:topic:878d394a:Power4"}    

//those items do not have this issue
Switch Valve_Left_Garden        "Ventil Johannisbeeren"     <faucet>      (gGardenIrrigation)    ["Switchable"] {channel="zwave:device:86910632:node9:switch_binary", expire="2h,command=OFF"}
Switch Plug_TerraceLeft_Garden	"Steckdose Terrasse links"	<poweroutlet> (gGarden)                   {channel="zwave:device:86910632:node10:switch_binary"}

My sitemap:

Frame label="Steckdosen"
	Switch 		item=Plug_TerraceLeft_Garden		mappings=[ON="An", OFF="Aus"]
	Switch		item=Plug_RaisedBed_1				mappings=[ON="An", OFF="Aus"]		visibility=[Sonoff4CH_Garden_RaisedBed_Ping==ON]
	Switch		item=Plug_RaisedBed_2				mappings=[ON="An", OFF="Aus"]		visibility=[Sonoff4CH_Garden_RaisedBed_Ping==ON]
Frame label="Ventile"
	Switch		item=Valve_Left_Garden 				mappings=[ON="Auf", OFF="Zu"]		visibility=[Valve_Garden_Left_Ping==ON]
	Switch		item=Valve_Garden_RaisedBed			mappings=[ON="Auf", OFF="Zu"]		visibility=[Sonoff4CH_Garden_RaisedBed_Ping==ON]
	Switch 		item=Valve_Garden_Right				mappings=[ON="Auf", OFF="Zu"]		visibility=[Sonoff4CH_Garden_RaisedBed_Ping==ON]

So the only thing between the two working items and the four not working items is the binding (MQTT with the additional state, ZWave working as expected)

Can somebody open my eyes?
I did restart OH with cleaning the cache already several times but that did not help…

Try an empty label format:

"Steckdose Hochbeet 1 []"

Thanks a lot @sihui! This is working. Even though iI can’t explain why the items behave different.

Anyway: I’m happy

1 Like

Perhaps the MQTT channels default to displaying the status in a sitemap?

You could test that by creating an item with one of the MQTT channels, and then replacing it with a ZWave channel.