OH3: String item needs StateDescription to get displayed in Basic UI

I have some string items that I do set in a rule. The items display fine in MainUi, but they don’t in BasicUi.
I have to add a StateDescription meta data with pattern %s to every item, so that is gets displayed in BasicUi.

Why is this? A pattern of %s looks very unnecessary for an item of type string…

These are my items in MainUI:

  - component: oh-masonry
        - component: oh-label-card
            item: RobbiSensor_StateString
            title: Aktueller Status
            icon: oh:lawnmower
        - component: oh-label-card
            item: RobbiSensor_LastChargeCycle
            title: Dauer des letzten Aufladens
        - component: oh-label-card
            title: Dauer der letzten Ausfahrt
            item: RobbiSensor_LastMowCycle

These are my items in BasicUI:

            Frame label="Robbi" {
                Text item=RobbiSensor_StateString
                Text item=RobbiSensor_LastChargeCycle
                Text item=RobbiSensor_LastMowCycle

All items show up in MainUI, but only the “StateString” shows up in BasicUI, because this is the only one, that has the StateDescription.

Rule of thumb; you get what ask for. Don’t ask for a display, don’t get a display. That’s about user-facing GUI, where you might even want to suppress state display altogether (in favour of icons etc.)

In administrative UI areas, you should expect to see raw Item states, the behind-the-scenes view, regardless of prettifying options.

1 Like