Unit metadata

  • Platform information:
    • Hardware: Raspi 4B
    • OS: Raspbian
    • Java Runtime Environment: V17
    • openHAB version: 4.02

Hi,
after having read the instructions for handling the Units of Measurements after upgrading to OH4 I would have thought, there would be a Unit-option in the GUI metadata dialog of the item, but there isn’t. State description pattern from that dialog is not meant for that purpose and a item-value-pair under options (“Unit=Wh”) doesn’t work either.
Is my installation faulty or have I missed something?
Regards
Michael

O.K., lastly found it. Don’t know, why havn’t seen before.

1 Like

Seems to be an issue with the installation: For most of the items the most upper field in the dialog is “State description”, only for some of them there is also the “Unit” line for selection. Weired.
Michael

Unit is only available for number items, it has no meaning for other item types.

Unit is only available for number items, it has no meaning for other item types.

When there is a number:energy item, that I want to be handled as Wh instead of default kWh, there should be a unit metadata option?

Correct. Can you shortly describe what is necessary to reproduce this issue? It never happens for me, so probably it is related to a specific order of actions.

1 Like

So I’ve been going through most of the items now and recognized, that only the items derived from a MQTT thing lack that unit feature. But in the item dialog of the MQTT channels there are already options for UoM, so the related items inherite these and there is no need for further options.
Unfortunately these items units don’t show up in the items overview, but that’s another thing.

1 Like