Group:Switch ON only if all members are ON


As I can see Group:Switch gets ON state if any of members are in ON. It is possible to set Group to behave opposite way? I mean to get ON state only if all members are in ON state?

Thank you,

Yes, you can add a function.

Group:Switch:AND(ON, OFF) gLight_GF

See here:

I was just going to quote from the docs and have them search . The forum is not an alternative to reading the docs and doing your own research.

Here is the quote.

The third uses AND and sets the Group state to ON if all of its members have the state ON , OFF if any of the Group members has a different state than ON .

Dear Bruce,

I understand your point but please keep in mind that documentation is not necessarily straightforward for beginners. Some of us are hobists without real development experience. someteime documentation what was writted for developers is difficult to understand.

Thank you,

Just to add to this, OH3 allows you to define Group settings in the UI for the group, member base type like switch, contact, rollershutter and based on that selection to allow to set the aggregation function like “One ON then ON else OFF” or like what you want “All ON then ON else OFF”… just in case…

You did not state you had even looked there It appeared to me you showed no effort in trying to find a solution. Sorry.