Rule which iterates through group(s) of similar items

That design pattern is actually several examples showing lots of ways to use Groups in Rules and that is just one of them.

Here are a few simple examples which might give you some ideas:

// Do something for every Item that contains Temp in the name
MyGroup.members.filter[i | i.name.contains("Temp")].forEach[ temp |
    // do something with an Item that has Temp in the name
]


// Calculate the average of all the NumberItem members of the Group
val nums = MyGroup.members.filter[i | i instanceOf NumberItem].
val avg = nums.map[state as Number].reduce[result, val | result = (result + val) ] / nums.size

// Send ON to an Associated Switch Item for all Temp sensor Items that are > 20
// We find Associated Items based on the name of the sensor with "_Switch" appended
MyGroup.members.filter[i instanceOf NumberItem].filter[temp.state as Number > 20].forEach[ temp |
    val assocaitedSwitch = MyGroup.members.findFirst[sw | sw.name = temp.name+"_Switch"] as SwitchItem
   assocatedSwitch.sendCommand(ON) 
]

Go back and look at that DP again as all of these methods (except for findFirst which is self explanitory) described with examples.

I’ve been helping someone via PMs on just such a Group based approach.