Transformations from-to

I would like to show a text on a string instead of the value from my wind sensor.
So if the wind speed is from 0.0 to 0,2 it should say still

I have made a file with this input:

[0.3,1.2]=almost still
And so on

My item

String windspeed "[MAP(]" (weather)

My problem is that it could not accept my from and to, so I think it must be written wrong


I’m no expert here, but your trying to convert/show a number value as text, and I think this needs to done via a rule and probably with a second ‘dummy’ wind speed item.

So something like… If WindSpeed between 0 and 0.2, then MySpeed = “Still”, etc.

Just giving an idea what I think needs be done. I can may look later in the week if nobody else gets to it first.

See if this helps:

If the value delivered from weather binding is a number, you have to use Number as item type. This does not affect the label, displayed through UI!
If you want that string, set through the .map-file, you can refer to the .map-file like done in the label.

It was a typing error, my item is a Number item,

my log displayes this error, it works if I display every number with a text like


But I dont think this is the right way to go.

17:14:00.369 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '0.1' with the file '' : Target value not found in map for '0.1'

Ah, I didn’t realize it… you have to use scale, not map transformation

for OH1, see Transformations · openhab/openhab1-addons Wiki · GitHub (with information about how to use it in items definition)
for OH2 see

EDIT: as links have changed…

Thanks it worked :slight_smile: