Jump to content

Wait does not work correctly...


Recommended Posts

I have a program that turns on a light based on motion from sunset to sunrise. The program needs to wait 2 minutes before turning off the light. The lights turns on correctly, but does not turn off 2 minutes later.


This is my first program using Wait statement, so I am not sure what I am doing wrong, or if I should use something else than the wait command.


I am on version 4.0.2



       Status  'OutSide / FrontMotion / FrontMotion-Sensor' is On
   And From    Sunset  - 15 minutes
       To      Sunrise +  5 minutes (next day)
   And Status  'OutSide / Front-Center' is Off

       Set 'OutSide / Front-Center' On
       Wait  2 minutes 
       Set 'OutSide / Front-Center' Off

  - No Actions - (To add one, press 'Action')

Link to comment

The IF part of your command get re-evaluated during the WAIT command, and on the second eval it's false so the wait cancels and nothing else runs past that. If you want to use the logic as is, have your then run a second program that does the light on/wait/off (with no conditions on the IF). The use of the second program ensures their is nothing to re-evaluate to cause the wait to not complete.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...