Problem with unit °dH for item of type Number:AmountOfSubstance - using mol instead of °dH

Hello.

There seems to be a problem with number items of type AmountOfSubstance and unit °dH.

I’m receiving a numeric value (for hardness of water in °dH) by the MQTT binding.

When trying to assign an item to this thing and specifying unit °dH to it I get the following warning in the log file and the value shows as unit mol instead of °dH:

2024-07-08 11:28:33.129 [WARN ] [penhab.core.library.items.NumberItem] - Unit '°dH' could not be parsed to a known unit. Keeping old unit 'mol' for item 'gruenbeckRawWater'.

Is there anything wrong with my config or is this an issue in openHab or the mqtt-binding itself?

Any help is highly appreciated!

Thanks and kind regards,
Ralph…

Thing file:

Bridge mqtt:broker:MQTTMosquittoBridge "MQTT Mosquitto Bridge"
[ 
	host="10.0.0.10", 
	secure=false,
	port="1883", 
	username="xxxxx", 
	password="xxxxx" 
] 
{	
        //Grünbeck SoftliQ:SD21:
	Thing topic gruenbeckSoftliqSd21   "Grünbeck SoftliQ:SD21 Wasserenthärter"
	{
		Channels:
			Type number: rawWater   "Wasserhärte Rohwasser"   stateTopic="gruenbeck/0/softliQ/D/BS50066140/rawWater"]
	}
}

Items file:

Number:AmountOfSubstance   gruenbeckRawWater    "Wasserhärte Rohwasser [%.2f %unit%]"      {channel="mqtt:topic:MQTTMosquittoBridge:gruenbeckSoftliqSd21:rawWater", unit="°dH"}

I believe this comes from the fact that °dH is not a unit known by openHAB core system.
You will want to request it by creating an issue at Github and wait for it to be integrated.

Well, according to the official and most recent 4.2.x openHab documentation °dH is a supported unit of number items of type AmountOfSubstance.

As found in chapter “SI (base unit symbols)” in https://www.openhab.org/docs/concepts/units-of-measurement.html

Ah right, I missed it.

Then, unless the ° symbol does not use the expected Unicode code point, I can’t see any reason either.