I measure with Sonoff the Temperature, configure it as an item and display it in a sitemap. Everything is working fine. But. The value of the Temperature is off by 2 °C. Rules and Sitemaps are wrong because of this. Of course I can “adapt” the rules … but it kind of gets very complicated. It would be much easier if I could alter/change the incoming value to what is correct. I would like to change the incoming value e.g. 20 °C to 22 °C. How can I do this?
Many thanks for any tip. Patrik
Try the offset profile: Transformations / Profiles | openHAB
Hello Wolfgang - many thanks for your fast answer. This is the solution, I am sure. But I make a mistake.
When I change some string in the sitemap and conctrol it on my mobile then it reflects this change within 2 seconds. But not now when I change the values in my Item.file
Initially I made test with 5 °C which was working immediately and correct. The problem now is that when I change the offset value to e.g. 10, -10 etc. nothing happens. The value remains at +5
Here the line of code I am using in my item-file:
Number:Temperature StubeActualTemp “Stube Messen Temp [%.1f°C]” (gAhornSensoren, gTemperatur) [“Measurement”, “Temperature”] {channel=“mqtt:topic:Schwendi29MqttBroker:stube_sonoff_temp:Temperature”[profile=“offset”, offset=“2”]}
Maybe you see my error. Thanks.
I think there’s a bug where the value changes aren’t updated if the item is defined in a .items
file. Only a restart of openHAB will pick up the new values.
Hello Mark - many thanks for your tip. Simple but effective
Indeed, changing my values and restarting does the trick.
Your answer implies that there is another/better place to do this then an .items file. Where would it be?
Anyhow - I am able to adjust my temperature as desired. Thanks!
Yes, there’s another (not necessarily better) place to do it.
Items defined through text files are so-called “unmanaged” items. If the items are “managed” (i.e. defined through the UI), any changes to the items would be picked up immediately without requiring a restart.