Not sure I completely understand the problem but the item
Group:Switch:OR(ON,OFF) gPresence
will switch to ON if either one of its members switch to ON.
As in, as long as any member of that group is ON the gPresence group item will switch to ON.
Sure, but the underlying value is 2 for me, if two items are ON. Why? I used OR and not SUM.
OH2 switch is interpreting any value > 0 as ON. But I just want an ON=1, not 2 or 3 or…
EDIT: I have the same problem with Contacts. Problem with this is, how should I add a mapping to a not constant value?
0=off
1=on
2=more on
3=even more on
For me the OR is buggy. What happens should happen if I used SUM. But I don’t,
I know some people would like this feature, but I do not think it is intended behaviour. I do not use OH2 yet, but can others confirm this counting? Should an issue be raised?
I think you will find that the %d parameter returns the number of items in the group, which is 2 in your case. The %s returns the string representing the state. Or something like that.