Oh-rollershutter-item: stateInCenter using state instead of displayState

Hi,

OH 3.4.1

I have added group item with memberbasedtype rollershutter.
Due to the aggregation the state of the group is not 100 but 100.00000000, therefore I have configured state description meta data on the item:

value: " "
config:
  pattern: "%.0f %%"

That’s working fine in general. However if I use a oh-rollershutter-item and activate the stateInCenter option the metadata is ignored and only the state, not the visible state is used. Please see the screenshot below.

Is there something I am doing wrong or is the oh-rollershutter-item widget limited to using the state?

Thanks in advance for any input :slight_smile:

component: oh-list-card
config:
  title: Rollläden
  mediaList: false
  simpleList: false
slots:
  default:
    - component: oh-rollershutter-item
      config:
        item: OG_Schlafzimmer_Fenster_Rollo
        title: Rollos gemeinsam
        iconUseState: true
        stateInCenter: true
        icon: oh:Blinds
    - component: oh-rollershutter-item
      config:
        item: Schlafzimmer_Rollo_links_Position
        title: Rollo links
        icon: oh:Blinds
        iconUseState: true
        stateInCenter: true
    - component: oh-rollershutter-item
      config:
        item: Schlafzimmer_Rollo_rechts_Position
        title: Rollo Rechts
        icon: oh:Blinds
        iconUseState: true
        stateInCenter: true

For me the items does display as the displayState, however for footers I need something like this;
footer: =items.PatioDoorsensor88_BatteryLevel_DateTime.displayState

Maybe try adding that.displayState to the item? (not an expert, just a thought)

Currently the stateInCenter option will only show the true state. You’ll have to file an issue on the web-ui repository, to get that updated.

You’re only real recourse at the moment would be just display the value outside the arrow buttons where you can control the formatting. The rollershutter item does take an after slot, so something like this should work on 3.4.1:

    - component: oh-rollershutter-item
      config:
        item: OG_Schlafzimmer_Fenster_Rollo
        title: Rollos gemeinsam
        iconUseState: true
        icon: oh:Blinds
      slots:
        after:
          - component: Label
            config:
              text: =@OG_Schlafzimmer_Fenster_Rollo
1 Like