KNX: Items with different group addresses

Hi there!
i’m controlling my entry gate with different knx group adresses…
for now i have created different switches:

OPEN
CLOSE
STATUS

to open the gate i have to send “ON” to the OPEN Switch, to close i have to send “ON” to the CLOSE switch, STATUS is ON when the gate is closed and OFF when the gate is OPEN.

Is there a way to reduce this to one item?

You can reduce it to one widget in the UI by defining a fourth item and some rules:
items:

Switch GateOpen {knx="..."}
Switch GateClose {knx="..."}
Switch GateState {knx="..."}
Contact GateProxy "Gate is [%s]" {autoupdate="false"}

sitemap:

Switch item=GateProxy mappings=[CLOSED="CLOSE",OPEN="OPEN"]

rules:

rule "control gate"
when
    Item GateProxy received command
then
    if (receivedCommand=OPEN) 
        GateOpen.sendCommand(ON) 
    else 
        GateClose.sendCommand(ON) 
end

rule "gate state"
when
    Item GateState received command
then
    if(GateState.state == OFF) 
        GateProxy.postUpdate(CLOSED) 
    else 
        GateProxy.postUpdate(OPEN) 
end