Openhab and decimal separators

I am actualy facing the problem that all my temperatures within openhab are displayed as float with “,” as separator, but I am receiving mqtt messages with “.”. If I am right I can use rules to transform this without changing my complete system language.
But I really don’t understand how this works?


You can use a JavaScript transform to replace the . with ,.

You can configure the MQTT Channel to use that transformation and the value will be changed before it ever reaches the Item.

Hi thx,
Ok that is exactly what I am now trying. Now I am a the state that I can see all separators equal, but one is not shown in my graph, I am sure that this is maybe because of wrong data type string instead of float.
I created a transform script:

var logger = Java.type(‘org.slf4j.LoggerFactory’).getLogger(‘org.openhab.rule FLOBO’);
(function(temp) {
var out_temp = parseFloat(temp);;
return out_temp;

And added this within the channel (channel="mqtt:topic:82968fcf2f:ESP_HOCHBEET_INDOOR:temperature) below:
Incoming Value Transformations

item file:
Number:Temperature i_ESPHOCHBEET_Temperature “Luft temperatur [%.1f °C]” (g_Hochbeet, persist_Group) [“Temperature”] {channel=“mqtt:topic:82968fcf2f:ESP_HOCHBEET_INDOOR:temperature”}

persist file:
Items {
// additionally persist Items
g_Temperature* : strategy = everyMinute -> displayed in graph correctly
persist_Group* : strategy = everyMinute -> rrd file existing and getting updated but not on graph
This seems to work I am getting the temperatures displayed in the item/log but not within the graph, this actually is the only value from MQTT every temperature from Homematic is getting displayed.

I am getting forward a little bit, and hopefully I understand the linking of scripts, items etc. soon :slight_smile:


I deleted again all persistence files, deactivate and activates again and now its working.
All temperature are shown in graph