Pee or poop timer flow

Hi All,

With the risk of asking for help on a topics that has been discussed before.

I want to create the following flow for the toilet. If movement is detected then switch on the hue light. (The switching off of the light is done via Hue after 3 min.) If the light is still on (because of movement) after 3 min then switch on the fan after 3 min for 5 min.

So I need a timer that checks after 3 min if the light is still on. How to do that?

Regards M,