Mysensors output

Iv have some trouble with outgoinig signals from openhab2
the sitemap switch sends out on and off
not good for mysensors, i need 1 and 0 so made a .map in transform
but were do i have to place the call for that

Number  tripsmoktrap01   "Test Brandmelder trap[MAP(switch1.map)]"   { channel="mysensors:customSensor:gateway:tripsmoktrap01:var1" }

doesnt work, do i have to place it in the channel name?
every were i tried a get a warn

Received HTTP POST request at 'items/tripsmoktrap01' with an invalid status value 'OFF'.

I’m pretty sure the .map file only converts the output for the gui, not for use in rules etc.

You could try something like:

rule "Smoke Convert"
when
        Item tripsmoktrap01 received update
then
        if(tripsmoktrap01.state==0) {
                                sendCommand(tripsmoktrapSwitch, OFF)
        } else if(tripsmoktrap01.state==1) {
                                sendCommand(tripsmoktrapSwitch, ON)
        }
end