Our system will turn the lights on when a guest arrives:
Then we have a sensor which we check to see if they're truly on:
We can also mock the systems that we don't have access to yet, let's pretend the lights are bright:
We also have a chimes system: one that can greet guests. Let's configure it to greet only Jane...
Since we don't have the chimes system built yet, we'll just mock it:
You can see how this new
$when rule matches only
Jane - so other guests will not be notified... something you can test: so why don't you test to see if John is greeted (hint: change Jane to John in the story and see what happens) !