Imitating the Power Consumption of Lights (and others)

I think it still qualifies as a Design Pattern, but I’ll write it more like a tutorial than just an example.

I’ve already written most of it up in my own notes. I’ve transcribed it and beefed it up a bit here:

It ended up being difficult to provide a step by step guide as the steps are just:

  1. add your Items to groups
  2. trigger the rule on all Items (or Group updates if multiple execs of the rule per event isn’t a problem)
  3. pull the triggering Item from the Group based on lastUpdate
  4. code as usual

However, I did provide examples for and description of what all of the MyGroup.members.* methods do (at least all the ones I know) including map/reduce.