I have motion sensors at the top and bottom of the staircase. I'm trying to create a rule where the condition is if I walk down the stairs and trigger the top motion sensor and then trigger the bottom sensor, then my bedroom lights will turn off.
It would be good to know a couple things for this automation:
How long does it take you (or your household members) to walk from the top of the stairs to the bottom?
Which motion sensor are you using? And what is its cool-off period? By the latter, I mean - how long does it take to switch from a state of "motion detected" to "no motion"?
With all that said, your rule could be something as simple as the one pasted below.
In Sleep Mode, when an upstairs motion sensor is triggered, my nightstand is turned on to a level of 10% (or dimmed from whatever level it is at to 10%).
When a second motion sensor is triggered, the nightstand is turned off after a delay of 15 seconds.