Ensure with group items #309
Replies: 1 comment
-
MyGroup.ensure.on will send ON to the group only if the group (as a whole) is not already in state ON. How this is determined is based on how the group is defined. The default aggregation function is EQUALITY, so the group will be ON only if all member switches are ON. Because this is sending the command to the group, if any member is not ON, doing MyGroup.ensure.on will send ON to the group, and then internally OH will forward that to every member of the group, regardless of its current state. MyGroup.members.ensure.on will send ON to each member of the group that is not already in state ON. It will never send a command to the GroupItem itself. In most cases I'm doing the latter (sending the command to members, so that ensure processing happens item-wise), but I do have some groups that I purposely have received_command rules on the groupitem itself (because I can translate that to a single command out my binding, instead of X commands, and it's important because too many commands causes lots of radio activity that can be more difficult for the devices to receive). so I think it's important to maintain the distinction. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Does ensure matter for group items?
If you have a group of items of type Switch and some are in state OFF and some are in state ON. If you send ON to the group switch does it only send the command to those not already in that state or does it send them to all?
Beta Was this translation helpful? Give feedback.
All reactions