To show dynamic icon of my batterylevel items I have to set iconUseState: true EVERYTIME for Default List Widget?

  • Platform information:
    • Hardware: Synology DS716
    • OS: DSM 7 in Docker Container
    • openHAB version: 4.0.0.M1
  • Issue of the topic:
    I want that all my Number Items with batterylevels show an dynamic icon in the UI.
Number:ElectricCharge           Fenster_Schlafzimmer_Ost_Rechts_Batterieladung      "Batterieladung Fenster Schlafzimmer Ost Rechts"    <batterylevel>  (Batterieladungen, Fenster_Schlafzimmer_Ost_Rechts)         ["Measurement","Voltage"] {channel="deconz:openclosesensor:bridge:00158d00091a6b07010006:battery_level"}

To achive this I now have to add 2 Meta Data fields for everyitem in the UI with the following property set:

iconUseState: true

Only then I get the dynamic icons displayed. Thats a lot of work for more then 50 items in my setup.

The first two items here have this property set, the last one not:

Isn’t there a global option to activate that behavior like it is on default for windows and doors?

The default widget Item metadata is setting the default for that Item. There is no way to globally set a default widget for all Items of a type.

However, you can create a custom widget (under developer tools) with everything configured just how you want it and then select that as your default widget for each Item you want to use that as the default. There’s a whole page dedicated to this in the Getting Started Tutorial. Pages - Custom Widgets | openHAB

Hi Rich,
I’m very familiar with the custom widgets and use many already. I really did hope that for this matter it would be possible to activate the same dynamical behaviour for the batterylevel icon as for the window/door icon without touching every single item. Maybe this would be an optimatization for openhab 4 to have this as the default behaviour.
Should I suggest this in github?

You can open an issue but someone will have to volunteer to implement it.

2 Likes