I’m attempting to build a rule in the OH3 UI which uses triggeringItem to send a notification. I see that this was deprecated in OH3 for all but “Member of” triggers. This is fine, I created a group for the items, set my trigger accordingly, and all is well.
I notice that if I include an aggregation on the group, then the group and the member item both trigger the rule. When I disable aggregation, only the triggering member item triggers the rule.
Is there a way to have aggregation on a group, but have the group’s state changes be ignored by a “Member of” trigger, so that the rule only runs on the member item?
I think a workaround would be to have two groups, one that reports the aggregate for human consumption, and one which isn’t aggregated for the rule triggers, but I’m wondering if anyone is aware of a more elegant solution.
val notify = getActions("pushover", "pushover:pushover-account:[...]")
notify.sendMessage("Activated by: "+triggeringItem.label,triggeringItem.label)
The odd thing is that when a group has its “Aggregation Function” configured I receive two notifications, one for the item and one for the group. When it is removed, I only received a notification for the item. My theory, given the simplicity of the script, is that the Action is somehow running twice?
Here’s an example of the notifications when I open a contact sensor called “Sliding door” in a group called “Watchdog: Door sensors”. At 12:55, the Aggregation Function for the group is set to “One OPEN then OPEN else CLOSED”, and two notifications arrive. At 12:56, I set Aggregation Function to “None” and only one arrives.