[SOLVED] Newbee: My mapping does not work

Hi,

today I wanted to use mapping for the first time, but could not succeed :-(.

What I did:

  1. Created a TestSwitch item in file “test.items”:
Switch TestSwitch "Test"
  1. Created a mapping file “test.map” in transform folder:
TestSwitch=MySwitchMapped
  1. Added a rule in “test.rules”:
rule Test
when Item TestSwitch changed
then
  logInfo("test.rules", transform("MAP", "test.map", item.name.toString))
end

But if I activate the switch in Basic UI the log always shows

2019-01-12 14:31:50.110 [INFO ] [se.smarthome.model.script.test.rules] - TestSwitch

The text ‘TestSwitch’ never gets mapped to ‘MySwitchMapped

Even if I use:

logInfo("test.rules", transform("MAP", "test.map", "TestSwitch"))

I don’t get the mapped text.

Do I have to activate the mapping anywhere in OpenHAB Paper UI?
What I am missing please?

Thanks…

You have to install the Map transformation in Paper UI via Add-ons :arrow_forward: Transformations :arrow_forward: Map Transformation

Please use code fences in the forum, thanks

Hi RolfV,

thanks that is the solution :slight_smile:

I wonder why this is not mentioned here:

https://www.openhab.org/docs/configuration/transformations.html

@vzorglub: sorry - I did now :slight_smile:

Added to docs.
Thanks

@vzorglub: Great! :+1: