Yeah, I think it’s the default which it uses if you assign the Temperature type - even if I don’t realy understand why it uses the °C
as the default in your case and not the %unit%
then…
{
"link": "http://192.168.1.31:8080/rest/items/Informations_uom_number",
"state": "2.41 °C",
"stateDescription": {
"pattern": "%.1f %unit%",
"readOnly": true,
"options": []
},
"editable": false,
"type": "Number:Temperature",
"name": "Informations_uom_number",
"label": "UoM Temp",
"category": "Temperature",
"tags": [
"Point"
],
"groupNames": [
"Wetterinformationen"
]
}
You are right - good find with the digits.
You generally can use Math methods in YAML for example =Math.round(items.XY.state)
works - sadly it won’t work here as it takes the value into account which messes up the calculation obviously.
This is the reason for me, I mostly renounce from using types or at least defining a separate stateDescription without the value symbol for calculations like %.0f
- so that =Math.round(items.XY.displayState)
would work.