Hi,
I stumbled over a problem with my Number:Temperature items which are assigned to the semantic model and shown in the main ui (category sensors).
Both items should display “°C” behind the value of the temperature but it is not happening for all items as I would have expected it.
One item is getting its state via MQTT and the other one from a Jeelink sensor.
Number:Temperature XiaomiAqaraDHT01_Temperature "Temperature" <temperature> (XiaomiAqaraDHT01) ["Measurement","Temperature"] {widgetOrder="0", channel="mqtt:topic:broker:xiaomiAqaraDht01:temperature"}
Number:Temperature JeeLinkSensor01_Temperature "Temperature" <temperature> (JeeLinkSensor01) ["Measurement","Temperature"] {widgetOrder="0", channel="jeelink:lacrosse:2:temperature"}
If I take a look at these items in the karaf console I get the following results:
openhab> openhab:items list JeeLinkSensor01_Temperature
JeeLinkSensor01_Temperature (Type=NumberItem, State=4.9 °C, Label=Temperature, Category=temperature, Tags=[Measurement, Temperature], Groups=[JeeLinkSensor01])
openhab> openhab:items list XiaomiAqaraDHT01_Temperature
XiaomiAqaraDHT01_Temperature (Type=NumberItem, State=21.11 °C, Label=Temperature, Category=temperature, Tags=[Measurement, Temperature], Groups=[XiaomiAqaraDHT01])
The item XiaomiAqaraDHT01_Temperature already seems to have the proper measurement unit but somehow it is not displayed in the ui.
From my understanding it should assign the measurement unit automatically if you use the item type Number:Temperature but unfortunately this doesn’t seem to work as it is intended to do (at least on my oh instance)
Is there anything else that needs to be done to ensure that the proper units are displayed?
Another thing I noticed is the representation of items with the type Number:Dimensionless (Humidity in the screenshot above).
Both items in the screenshot are configured the same way except of the thing channels (which are linked to MQTT/Jeelink things), the names of the items (kind of obvious ) and the group names.
If I query these two items in the karaf console I get these results:
openhab> openhab:items list JeeLinkSensor01_Humidity
JeeLinkSensor01_Humidity (Type=NumberItem, State=65 %, Label=Humidity, Category=humidity, Tags=[Measurement, Humidity], Groups=[JeeLinkSensor01])
openhab> openhab:items list XiaomiAqaraDHT01_Humidity
XiaomiAqaraDHT01_Humidity (Type=NumberItem, State=44.53, Label=Humidity, Category=humidity, Tags=[Measurement, Humidity], Groups=[XiaomiAqaraDHT01])
The Jeelink item shows a % but not the MQTT one.
I changed the values of these items manually to check if it might have something to do with the decimal places but no luck so far.