Mapping questions

@tinkerfailure,
You’ll need to escape the colon (:) in addition to the spaces, like this:

User\ Opening\:\ 0002=Disarmed by xxxxx

and then it’ll work. Both colon (:) and equals (=) are considered delimiters in MAP files.

Here’s my sample Rule-based testcase to validate the above:

import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import java.lang.Integer

rule "MAP Test"
when 
    Time cron "0/10 * * * * ?"
then
    var String map = 'User Opening: 0001'
    var String mapped = transform("MAP", "test-map.map", map)
    logInfo("map-test", "map=" + map)
    logInfo("map-test", "mapped=" + mapped)
end

which results in log output like:

11:48:40.010 INFO  o.o.model.script.map-test[:53]- map=User Opening: 0001
11:48:40.014 INFO  o.o.model.script.map-test[:53]- mapped=Disarmed by xxxxx
2 Likes