Group switch not updating

I have some news on this topic. I guess I found something - at least a workaround. The trick seems to be the AutoUpdatePolicy (Thanks to #1330 (comment)). When I add autoupdate="false" to the Group the events will be emitted probably:

Group:Switch:OR(ON,OFF) gTESTSWITCHES1 "Test Switches 1" { autoupdate="false" }

Switch testSwitch1 "Test Switch 1" (gTESTSWITCHES1)

Initial situation: state of Switch and Group are both ON.

1st try: Sending OFF to Switch:

event: message
data: {"topic":"smarthome/items/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"OFF\",\"oldType\":\"OnOff\",\"oldValue\":\"ON\"}","type":"ItemStateChangedEvent"}

event: message
data: {"topic":"smarthome/items/gTESTSWITCHES1/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"OFF\",\"oldType\":\"OnOff\",\"oldValue\":\"ON\"}","type":"GroupItemStateChangedEvent"}

:+1: working

2nd try: Sending ON to Switch:

data: {"topic":"smarthome/items/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"ON\",\"oldType\":\"OnOff\",\"oldValue\":\"OFF\"}","type":"ItemStateChangedEvent"}

event: message
data: {"topic":"smarthome/items/gTESTSWITCHES1/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"ON\",\"oldType\":\"OnOff\",\"oldValue\":\"OFF\"}","type":"GroupItemStateChangedEvent"}

:+1: working

3rd try: Sending OFF to Group:

event: message
data: {"topic":"smarthome/items/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"OFF\",\"oldType\":\"OnOff\",\"oldValue\":\"ON\"}","type":"ItemStateChangedEvent"}

event: message
data: {"topic":"smarthome/items/gTESTSWITCHES1/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"OFF\",\"oldType\":\"OnOff\",\"oldValue\":\"ON\"}","type":"GroupItemStateChangedEvent"}

:+1: working

4th try: Sending ON to Group:

event: message
data: {"topic":"smarthome/items/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"ON\",\"oldType\":\"OnOff\",\"oldValue\":\"OFF\"}","type":"ItemStateChangedEvent"}

event: message
data: {"topic":"smarthome/items/gTESTSWITCHES1/testSwitch1/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"ON\",\"oldType\":\"OnOff\",\"oldValue\":\"OFF\"}","type":"GroupItemStateChangedEvent"}

:+1: working

That is the good news. Now we have to discuss how we can archive the same behavior without adding autoupdate="false" to the Group.

3 Likes