How to create automation with 2 motion detection

I want to create automation:
When 1 device detect 2 time motion detection in 15 second then switch toggle to on.

How to configure it?

Be aware that whether this is possible or not depends on your motion sensor’s cool down period and whether it holds the “detected” throughout the time period in question.

Wait for a Trigger