Lable with state description in openHAB4


i’ve not yet finished the migration from openHAB 2 to openHAB 4. In openHAB 2 i used the state of rollershutter items in the label, e.g:

Rollershutter Shutter_gf_living_west "Wohnen rechts [%d %%]"

How can i achieve that with mainUI in openHAB4?

This does not work:

label: Rolllade Mitte [%d %%]
type: Rollershutter
category: rollershutter
  - rollershutterWohnzimmer
groupType: None
function: null
  - Control

Best regards

Statedescription metadata is what you are looking for

Thanks for your answer. I tried it this way:


But no percentage value is shown:

Can you provide some more details?

Isn‘t this the sitemap you are showing?
You then have to add this to your Sitemap definition and not directly to the Item.

no, this is mainUI from the locations tab.

For sitemap: if no label defined on sitemap element then will use the label set on item

A specific label could be written like this in the label card fields “label” or “header” or “footer”

=items.E3DC_HOME_Power_AvgInKW.state+" (im 5min ⌀)"



Just take your specific item with “.state” or “rawState” or “numericState” :slight_smile:

In BasicUI in openHAB 2 it looks like this:

I want to achieve this in the auto generated equipment-view: overview → locations → “room”

Like this?

When you´re editing a new page, this Rollershutter item will appear automatically then

overview page

AFAIK, this is not possible. The default widget does not include the state.

Not what op is asking for. He wants the state added to the controls.

It would be %d %% or %.0f %% for the state description, without the

However, as the others already mentioned: state description is only the first part, the second part is a widget that will use the state description to actually display the state.

The roller shutters control widget will never display any state by design. You would need to use another widget, like a label card to display the state within main UI.

ok, thanks for your answers. Perhaps this is an hint to use manually created pages and don’t use the autogenerated views.

What do you mean: is this possibly the right approach? I like the overview-cards with the images and the state information like temperature etc.

The auto generated views are a good fit for a lot of used, but of course custom pages are more precise to personal needs.

You can also look into the default widget metadata. By this you can continue with auto generated pages, but also adjust the widget to your needs