I installed and configured the Netatmo Binding. I added an item for the WindAngle channel of the anemometer and added the item to my sitemap.
Everything worked fine. The item showd a number value in degrees and did so on my sitemap. But because this is difficult to read I wanted to scale the vaule to the typical terms (N, S, W, etc.). So I installed the Scale Transformation Service an followed this german guide OpenHAB Windrichtung von Grad in Himmelsrichtungen konvertieren.
So I created a windDir.scale file, changed the item type to string and changed the channel link profile to SCALE.
windDir.scale file:
[0..11.25] = N
]11.25..33.75] = NNE
]33.75..56.25] = NE
]56.25..78.75] = ENE
]78.75..101.25] = E
]101.25..123.75] = ESE
]123.75..146.25] = SE
]146.25..168.75] = SSE
]168.75..191.25] = S
]191.25..213.75] = SSW
]213.75..236.25] = SW
]236.25..258.75] = WSW
]258.75..281.25] = W
]281.25..303.75] = WNW
]303.75..326.25] = NW
]326.25..348.75] = NNW
]348.75..360] = N
[..] = Unknown Value
NaN="N/A"
Still everything worked fine. My item now looks like this:
These stateDescription are getting set when i link the channel. So even creating a new string item does not help because as soon as I link the channel the stateDescription for an angle are getting set.
I am mostly using the UI, where I can’t see this pre set Metadata so I looked via REST API to confirm the wrong Metadata. I was then able to change the stateDescription:pattern via UI by “Add Metadata” → State Description → Pattern → “%s”. That did not delete the other unnecessary stateDescriptionminimum, maximum and step but was enough to get my sitemap working.