Item formating not applied for oh-label-cell subtitle

  • Platform information:

    • OS: linux ubuntu
    • Java Runtime Environment: OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS)
    • openHAB version: 3.1M5
  • Issue of the topic:
    my item number is presented in OH3 UI without formatting the number
    i tried both configurations of the item but the number item is not applying the number formatting.
    the item state in the OH UI is always represented as “1.8848361111111112 kWh”
    in the oh-label-cell the item label is correctly shown as 1.9 kWh
    the subtitle shows 1.8848361111111112 kWh

  • Please post configurations (if applicable):

Number:Energy              GoEChargerSessionChargedEnergy       "Current session charged energy [%.1f %unit%]" ["Measurement", "Energy"] {channel="goecharger:goe:garage:sessionChargedEnergy"}
Number:Energy              GoEChargerSessionChargedEnergy       "Current session charged energy [%.1f kWh]" ["Measurement", "Energy"] {channel="goecharger:goe:garage:sessionChargedEnergy"}
component: oh-label-cell
config:
  item: GoEChargerSessionChargedEnergy
  subtitle: =items.GoEChargerSessionChargedEnergy.state
slots: null

  • here the item in karaf console:
list GoEChargerSessionChargedEnergy                                                                                                                                                                                   
GoEChargerSessionChargedEnergy (Type=NumberItem, State=**1.8848361111111112 kWh**, Label=Current session charged energy, Category=null, Tags=[Measurement, Energy])

is the issue in the item configuration of is there something wrong the the oh-label-cell?

Maybe try:

subtitle: =items.GoEChargerSessionChargedEnergy.displayState

many thanks that resolved the issue