Unable to make transformation profile work

When using the Gardena in combination with homekit, i need some transformation.

The channel provides a String value that is “Irrigation active” or “Valve closed”. I try to transform that into a switch with the following item declaration:
Switch testItem "TestLabel" { channel="gardena:irrigation_control:home:test:valveOne#activity [profile="transform:MAP", function="gardena"] }

With this gardena.map:

ON=Irrigation active
OFF=Valve closed
Irrigation active=ON
Valve closed=OFF

The switch allways remains null, while i’m sure the channel is updated to one of the known values.
The openhab.log does not show anything related.

Shouldn’t it be


instead of

so the channel delivers Irrigation active and Valve closed and you want to get ON and OFF out of those?
Besides the wrong naming (has to be full filename) you’ll have to escape the space:

Irrigation\ active=ON
Valve\ closed=OFF
1 Like

I tried all posibble combinations with and without the escape, with and without the file extension.
FTR: openhab logs don’t show an error with er wihtout the extension. But when i specify a non existing file, it complains.

Other suggestions, is this unsupported or a bug?

Give it a try via openHAB Main UI (i.e. create the Switch Item in Main UI, then link it via Main UI and set the profile there.) If it’s working then, there may be a so far invisible issue in the definition :slight_smile: but it definitely should work either way.

As I had some hickups when testing, maybe your Item definition is wrong in the first place…


Switch testItem "TestLabel" { channel="gardena:irrigation_control:home:test:valveOne#activity [profile="transform:MAP", function="gardena"] }

is missing a quote (besides the missing .map).

Switch testItem "TestLabel" { channel="gardena:irrigation_control:home:test:valveOne#activity"[profile="transform:MAP", function="gardena.map"] }

and you’ll definitely need the backslash, so this is correct (tested):

Irrigation\ active=ON
Valve\ closed=OFF

I have just copy pasted your example and also tried seting up an item from the gui and both items remain null. In the first screenshot you can see three items:

  1. gui based, mapped to switch
  2. file based, mapped to switch
  3. file based, not mapped string
    The second screenshot shows the qui map settings.