rule "detect light switching" when Member of gAdamLights changed from ON to OFF or Member of gAdamLights changed from OFF to ON // ignore NULL or UNDEF changes then val template = triggeringItem.name + "_pulse_" val button = gVlags.members.findFirst[i | i.name.contains(template)] if (button.state != ON) { // it was not openHAB // then it was a manual change // someone is stood at the wallswitch! logInfo("test", "Who is there?") // code whatever you want, like updating a presence Item } end