[SOLVED ] Update from mqtt 1 to mqtt 2 and textual / numerical state

Hello,
I got a little problem, when I upgrade from mqtt 1 to mqtt 2:
After upgrade to mqtt 2 I see on basic ui for every item with relationship to mqtt channels the textual / numerical state, but I don’t want to see this (see example below):

Rollos

my mqtt.things:

Thing topic rolllaeden {
        Channels:
Type    rollershutter :     eg_terrassenrollo       [ stateTopic="stat/jarolift/shutter/4", commandTopic="cmd/jarolift/shutter/4", on="UP", off="DOWN", stop="STOP" ]
Type    rollershutter :     eg_kinderzimmerrollo    [ stateTopic="stat/jarolift/shutter/6", commandTopic="cmd/jarolift/shutter/6", on="UP", off="DOWN", stop="STOP" ]
}

How can I switch off these textual / numerical status (when the item is a switch, I see ON or OFF)? For me it is enough to see the status by the icon.

Please show the definition lines for the items and the related lines of the sitemap. I deliberately wanted to see such values and have added [%s] to the sitemap label.

pups, sorry, I forgot this:
items:

Rollershutter 	EG_Terrasse_Rollo       "Terrassentür"  <blinds>   { channel="mqtt:topic:mosquitto:rolllaeden:eg_terrassenrollo" }
Rollershutter	EG_Kinderzimmer_Rollo   "Kinderzimmer"  <blinds>   { channel="mqtt:topic:mosquitto:rolllaeden:eg_kinderzimmerrollo" }

sitemap:

Frame label= "Räume" {	
	Switch item= EG_Terrasse_Rollo
	Switch item= EG_Kinderzimmer_Rollo
			}

Can’t find the related threads for this one (not a MQTT problem!), please try to add empty squared brackets [] to the label. I have defined at the sitemap line!

2 Likes

It doesn’t help, when I defined the items in sitemap ( still without [% s] ). The textual / numerical state is furthermore shown … :face_with_raised_eyebrow:

items:

Rollershutter 	EG_Terrasse_Rollo       { channel="mqtt:topic:mosquitto:rolllaeden:eg_terrassenrollo" }
Rollershutter	EG_Kinderzimmer_Rollo   { channel="mqtt:topic:mosquitto:rolllaeden:eg_kinderzimmerrollo" }

sitemap:

Frame label= "Räume" {	
	Switch item= EG_Terrasse_Rollo          label="Terrasse"      icon= "blinds"    
	Switch item= EG_Kinderzimmer_Rollo      label="Kinderzimmer"  icon= "blinds"
			}

additional Information:
when I integrate a roller shutter item, that have no relationship to a mqtt channel in items list (it only triggers e.g. a rule), I see no textual / numerical state in Basic UI ! Same with switches.

Like @opus said, if you want a null state display format you have to force it
label="Terrasse []"

Bindings can now supply Items a default state display format, and many OH2 bindings do. If you don’t say different, you get the default.

3 Likes

argh, sorry opus, I missunderstood the empty square brackets,
thanks rossko and opus, now it works!

Glad it’s working. :+1:

Please click the square box on the post that provided the solution.

Thanks