Fan on with motion and off with timer


#1

sorry new to this , so not sure if this is the right place to do this .
I want to turn my fan on with a motion sensor and have it run for a set time.
any help is appreciated .


#2

you can start with this:

IF motion sensor status CHANGES TO ACTIVE
then 
With Fan
Do Turn ON

IF motion sensor status STAYS INACTIVE for X minutes 
then 
with fan 
Do turn OFF

#3

If you want the fan to stay on a precise amount of time, (regardless if the room is occupied or not), then here is a slight variation:

IF motion sensor status CHANGES TO ACTIVE
Then 
    With Fan (TCP set to Never)
    Turn ON
    WAIT X minutes
    Turn OFF
END IF

With Task Cancellation Policy set to never, it will continue with the code… Even if the motion sensor changes again.


#4

Awesome! that works great. Thank you.


#5

this one would do the trick as well. Thank you.