Counting events

I need to count the trips of a motion sensor within a set period and have different scenes run depending on the trip count.

For instance:
Motion1trip activates Scene1
Motion1Trip within 120secs (double trip) of Scene1 activates Scene2

Can this be done with a PLEG?

That’s what Multi Trip is about.

Trip1 Motion1
Trip2 Motion1 @ 2 < 2:00

If you do not want Trip1 to fire twice:

Trip1 Motion1 and (Trip1; Motion1 > 2:00)
Trip2 Motion1 @ 2 < 2:00

Brilliant. :slight_smile: