[SOLVED] Item value vanishes in Basic UI

Hi,

I have the following (internal) item:

String        Praesenz_Innen_Zuletzt_Wo         "Letzte Präsenz innen"                                   <motion>

This item gets updated by a rule once in a while. The problem is that the value in the GUI is gone after I reload the page.

I’ve found out by doing this:

String        Praesenz_Innen_Zuletzt_Wo         "Letzte Präsenz innen [%s]"                                   <motion>

The value keeps there regardless what I do(refresh, go back and forward, etc.)

O.K. it works now but… WTF ?!

In for instance Basic UI the initial state of a page is made in the backend and any updates on it are sent via events to the frontend. So there may be label substitution logic differences between backend and frontend.

This is an issue because the behavior is not consequent. What UI were you using?

Edit:
Ahh the title already said it: Basic UI :slight_smile:

Yes, that’s true, without the %s the back end will display no value while the front end will display the state as value when receiving a state event.
Probably something to change.

I created an issue: https://github.com/eclipse/smarthome/issues/3294

1 Like

I realized that the solution is very simple, you just have to define a label with a pattern in the sitemap, like for example: Text item=Praesenz_Innen_Zuletzt_Wo label=“Letzte Präsenz innen [%s]”.
By the way, I will fix the lack of consistency between page loading and page updating in Basic UI.