Units Of Measurement conversion & chart

Tags: #<Tag:0x00007f5cad421358> #<Tag:0x00007f5cad429738> #<Tag:0x00007f5cad433aa8>

Hello, I’m using “Units Of Measurement” to convert values as this:

things/house.things

Type number       : pressure          "Pressure"           [ ga="<15/0/41" ]

items/house.items

Number:Pressure pressure  "Pressure [%.1f Pa]"  <pressure>   { channel="knx:device:bridge:meteo:pressure" }

sitemaps/house.sitemap

Text item=pressure label="Pressure [%.1f hPa]" {
  Frame {
    Switch item=Day_Period label="(PA)" mappings=[0="4h", 1="1D", 2="1W", 3="1M", 4="1Y"]
    Chart item=pressure period=4h refresh=10000 visibility=[Day_Period==0]
    Chart item=pressure period=D refresh=10000 visibility=[Day_Period==1]
    Chart item=pressure period=W refresh=10000 visibility=[Day_Period==2]
    Chart item=pressure period=M refresh=10000 visibility=[Day_Period==3]
    Chart item=pressure period=Y refresh=10000 visibility=[Day_Period==4]
  }
}

The value in label is correct, but the chart keep showing the unconverted values.
In KNX Binding there isn’t the option readTransform as Modbus…
Any idea?

Regards

Charts are produced from persisted data.
OH2 persistence services do not yet really understand UoM, and only record a numerical value. The units are simply ignored by persistence.

Profiles are handy for transforms of binding data at the channel level … but currently only transform to a String Item, that’s no use to you either.

I think in the end, if you must chart different data from the raw data, you would need to use a proxy Item and a rule to do the numeric scaling and persist/chart your proxy.

Thank you for reply,

the simple solution would be “readTransform as Modbus…” but it’s not present in KNX binding :frowning:

Regards