Show values in frame-label?

Hi,
i have a switch on my sitemap, where i can see the number of the powered on lights.

Can i show the number of powered on lights in the second example too (frame)?

item:

Group:Switch:OR(ON, OFF) Licht "Zentralschalter Licht [(%d)]"

sitemap:

first example

 Switch item=Licht mappings=[OFF="alles aus"]

____________________

2nd example

 Text label="Licht" icon="switch" {
            Frame label="Keller" {...
            ...

No, well…
It’s not officially supported but you can add an item to a frame. Be aware, that this might not be supported by all UIs: https://github.com/openhab/openhab-docs/pull/310#issuecomment-278306235

I see this is working in BasicUI - but just with “Frame”. I want to have it with “Text”.

There it isn´t working? I tried and had no success.

EDIT:
I see my initial question was about “frame”. But i want to see it in my sitemap on my first page, so it must be in the “Text” label.

I made a fast screenshot with some editing to show what i want:

I see, isn’t that a standard feature? You just have to add an item, just as you did with “Stromzähler” and “Fensterkontakte”.

http://docs.openhab.org/configuration/sitemaps.html#element-type-text

Text item=Licht icon="switch" {

Did I understand you wrong? What’s the issue here? Do we need to clarify something in documentation?

Fensterkontakte is only items. If i press the item, no additional site with all the windows will open. You can se the little arrow in the “Licht” line.
–> If i press “Licht” i get the site with all my lights. If i press “Fensterkontakte” then nothing opens, because it only shows the value.

So i would need 2 lines for this, one line for opening the new site and one line for showing how much lights are actually powered on.

I hope you underdstand my description?

When i press “Stromzähler” then i get a chart.

Hm, i did exactly that before what you described, i added item=Licht.
–> After that the sitemap wasn´t loading any more.

So i thought this wouldn´t work. But now i see, that it is nearly the same like the Stromzähler item and the charts…

Maybe this doesn´t work, because it´s not an item? “Licht” is a group.
Or maybe the error was, that i had item= and label= in the same line? Maybe if i use item= i have to remove label= first?

Will do some tests…

EDIT:
I think that was the error. I had item and label in the same line. After removing label and adding item it works now…

1 Like