I try to use a MAP transformation by defining the following pattern in stateDescription metadata of an item:
MAP(anlagenschema.map):%s
But I get the following error:
Failed transforming the state ‘4’ on item ‘Viessmann_Anlagenschema’ with pattern ’ MAP(anlagenschema.map):%s’: Couldn’t transform value because transformation service of type ’ MAP’ is not available.
“MAP Transformation” Add-on is installed an running:
openhab-transformation-map │ 3.0.0 │ x │ Started │ openhab-addons-3.0.0 │ Map Transformation
This may or may not be helpful - I originally had a Thing Channel and Item as a Number Type, and the MAP transformation worked sporadically (I couldn’t work out when it did and didn’t work, but it seemed to be a combination of saves and page refreshes).
Deleting and re-creating the Thing Channel and Items as String Types now seems to work fine - note you have to delete and re-create, at least with the Channels: you can’t change their Type after they’ve been created in the UI, and changing it in the YAML didn’t make the MAP work.
My use case was an incoming number, which I then MAP to a string (such as incoming 2 = Cloudy)
Still not working for me. Having the map-files from OH2.5 now transferred to OH3. but not result.
reinstall the transformation service / cleaned the cache. still no results. any ideas?
Hi, I have EXACTLY the same problem. It doesn’t seem to work exactly like OH2!
In fact it’s weird because the SCALE transformations I use for wind speed and wind direction ARE working! So MAP(rain.map):%s for my rain sensor to convert closed/open to rain/dry does NOT work in the Pattern window of State Description unless I put the map values manually into the OPTIONS window.
SCALE(beaufort.scale):%s DOES work in the Pattern window of State Description.
Everything worked perfectly in OH2 so it has nothing to do with missing files or failure to install the transformation add-ons. There are strange bugs in OH3.
Hi Kriznik,
Don’t think this is a solution. It should work like that but it doesn’t!
See my post down further… the SCALE transformation works fine when the file is referenced in the Pattern window of the State Description window but any MAP transformations simply won’t work unless I type the map values directly into that Options window lower down in the config card.
honestly I don’t know.
my production OH will remain at 2.5.8 for some time, till OH3 won’t mature a bit. Currently it’s way to much work to get it working correctly, which I’m not willing to take.
Yes it’s more modern and stuff, but OH2.5 just feels more friendly, less click-fest-like and so on