Transform (map) with ranges

In OH3, I try to define a transform using a map file containing ranges link in the following:
[0…22.50]=Nord
]22.50…67.50[=Nord-Est
[67.50…112.50]=Est
]112.50…157.50[=Sud-Est
[157.50…202.50]=Sud
]202.50…247.50[=Sud-Ouest
[247.50…292.50]=Ouest
]292.50…337.50[=Nord-Ouest
[337.50…360.00]=Nord

In the log file, I get the following message:
“Could not transform ‘230.00’ with the file ‘winddir.map’ : Target value not found in map for ‘230.00’”
What is wrong ?

MAP transform just doesn’t work like that, it’s a simple look-up for an exact match.

If you want numeric ranges, see SCALE transform.

which is a separate add-on

Thanks for the hint. I configure it as explain and it is working fine.

1 Like