Help with Variable condition

I need help with code for the following senario:
If someone inside Toilet /Rest-Room for more then ~5 minutes, power ON the vent for 2 min.

I had Motion sensor inside the toilet for trigger.
I wrote the following condition:
1 - GToilet_Vent_On GToilet$occupied and (GToilet$occupied; Now > 00:05:00) //if true - power on vent.
2 - GToilet$occupied GToilet eq “vacent” AND G_Toilet_Motion_unarmed < 6:00 //if true, set Variable GToilet: occupied.
3 - GToilet$vacent !G_Toilet_Motion_unarmed AND (!G_Toilet_Motion_unarmed; Now > 1:00) AND GToilet eq “occupied” //if true, set Variable GToilet: vacent.
4 - GToilet_Vent_OffGToilet_Vent_on AND (GToilet_Vent_on; Now> 2:00) //if true, power off vent.
Conditions 2,3,4 working well.
Condition 1 is not working - action is ok, but condition immediately true and not with 5 min. delay.
Thanks for your help,

Welcome to the board. It would be helpful if you can attach a PDF of your Status Report. The Status Report will be your friend in helping determine when conditions are actually met, when triggers are true or false, and when they happened.

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules