Jump to content

Wait does not work correctly...


Issacsim

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

 

 

If
       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

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

Else
  - 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

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...