rule "Tuer_Alarm"
when
Item SW_EG_Wohnzimmer changed
then
if (SW_EG_Wohnzimmer.state == ON) {postUpdate(CT_EG_Wohnzimmer,“CLOSED”)} else {postUpdate(CT_EG_Wohnzimmer,“OPEN”)}
end
Please be aware that a contact item is per definition a read only item, so there is no .sendCommand() method. But there should at least be a .postUpdate() method, so this should also work:
rule "Tür Alarm"
when
Item SW_EG_Wohnzimmer changed
then
CT_EG_Wohnzimmer.postUpdate(if(SW_EG_Wohnzimmer.state == ON) OPEN else CLOSED)
end