Hello,
i want to display and convert the recieved values from mqtt binding, made the definition of the unit in the things-file:
mqtt.things:
Bridge mqtt:broker:myAuthentificatedBroker “Mosquitto” [host=“192.168.xxx.xxx”, port=1883, secure=false, username=“test”, password=“testPW”, cliendID=“openHab”] {
Thing mqtt:topic:meineWetterstation:EmpfangeneWerte “WS2080_pywws” @ “Garten” {
Channels:
Type number : TemperaturAussen “Temperatur” [stateTopic=“weather/WS1080_pywws/temp_out_c” , unit=“°C” ]
}
To get the value with the right unit and formating of the description i use the .items-file:
mqtt.items
Number outTemperaturDefault “Temperatur [%.1f %unit%]” (gWetter) {channel=“mqtt:topic:meineWetterstation:EmpfangeneWerte:TemperaturAussen”}
Number outTemperaturCelsius “Temperatur [%.1f °C]” (gWetter) {channel=“mqtt:topic:meineWetterstation:EmpfangeneWerte:TemperaturAussen”}
Number outTemperaturFarenheit “Temperatur [%.1f °F]” (gWetter) {channel=“mqtt:topic:meineWetterstation:EmpfangeneWerte:TemperaturAussen”}
In my sitemap only outTemperaturCelsius and outTemperaturFarenheit show the same value (outTemperaturFarenheit should be the temperature converted to Farenheit), there is no conversion. With the item outTemperaturDefault is no unit diyplayed.
Is there a trouble in my configuration or understanding?
Thanks
Gregor