Yes it does. A map file can be used in the part of a Contact Item’s label. Or a Contact Item can be presented as a Switch type in a sitemap, with mappings= to produce a button effect. The buttons won’t have any effect, of course.
So I must be doing something wrong.
I am using the DWZWAVE which identifies as Switch. I need it to be a Contact.
sitemap:
Default item=DoorSlidingSwitch
Default item=DoorSlidingContact
Contact item=DoorSlidingSwitch mappings=[OPEN="ON",CLOSED="OFF"] // does not compile
contacts.map:
OPEN=ON
CLOSED=OFF
items:
Switch DoorSlidingSwitch "Sliding door switch is [%s]" (gDoorSwitches, test) { channel = "zwave:device:d8092b29:node11:sensor_binary"}
Contact DoorSlidingContact "Door Sliding Contact is [%s]" (gDoorSwitches, test) { channel = "zwave:device:d8092b29:node11:sensor_binary"}
Contact DoorSlidingContactMapped "Door Sliding Contact Mapped is [MAP(contacts.map):%s]" { channel = "zwave:device:d8092b29:node11:sensor_binary"}
rule:
when
Time cron "0 * * * * ?"
then
logInfo("Logger","DoorSlidingContact " + DoorSlidingContact.state + " " + (DoorSlidingContact==OPEN))
logInfo("Logger","DoorSlidingSwitch " + DoorSlidingSwitch.state + " " + (DoorSlidingSwitch==OPEN))
logInfo("Logger","DoorSlidingSwitchMapped " + DoorSlidingSwitchMapped.state + " " + (DoorSlidingSwitchMapped==OPEN))
end
and the results:
2019-01-13 14:35:01.773 [INFO ] [clipse.smarthome.model.script.Logger] - DoorSlidingContact NULL false
2019-01-13 14:35:01.779 [INFO ] [clipse.smarthome.model.script.Logger] - DoorSlidingSwitch OFF false
2019-01-13 14:35:01.783 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Switch Vs Contact': The name 'DoorSlidingSwitchMapped' cannot be resolved to an item or type; line 9, column 51, length 23