I have a proxy item and I want to update this item with the status changed by another item
rule "PROXY state changed test"
when
Item DoorSensor18_TamperAlarm changed
then
Thread::sleep(10)
postUpdate(DoorSensor18_TamperAlarm_PROXY, DoorSensor18_TamperAlarm.state)
end
If the item has the same type this is working well. But if the item types are different I want to use the map to convert it.
But this does not work, syntac error.
postUpdate(DoorSensor18_TamperAlarmProxy, MAP(convert_contact_switch.map(DoorSensor18_TamperAlarm.state))
content of convert_contact_switch.map:
OFF=CLOSED
ON=OPEN
CLOSED=OFF
OPEN=ON
NULL=Unknown