I am trying to do a if x happens and then y happens do z
Like for example: If Motion is detected at the stairs and then motion is detected in the living room (downstairs), then turn off the upstairs hall light (because you went down the stairs, clearly).
And to make sure it does not happen if you go living room motion then stair motion
I have been toying with the group of “followed by” function but it does not seem to work