Jump to content

Lights on at Sunset off 30 Minutes later


AnthemAVM

Recommended Posts

I'm not an expert here but here is what will work if you want the lights to go on at sunset then off after 30 minues

 

If time is sunset

 

then

 

Set 'whatever you want' on

wait 30 minutes

Set 'whatever you want' off

 

else

 

 

this should work if I understand what you are trying to do

Link to comment

There are no experts here :) We are all new to this ISY. Maybe some more experienced :roll:

 

AnthemAVM, I believe what you are thinking is

If
       From    Sunset 
       For      30 minutes 

Then
       Set 'Backyard' On

Else
       Set 'Backyard' Off

 

Which would work, but it will be turning off the Backyard any time you are outside of the 30 minute window. We don't want that, do we?

 

If you know you will only ever want it on for 30 minutes at a time the Wait example from gfrnd is the way to go.

 

For lights I would use two programs.

 

Backyard On

If
       Time is Sunset 

Then
       Set 'Backyard' On

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

 

Backyard Off

If
       Time is Sunset  + 30 minutes

Then
       Set 'Backyard' Off

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

 

Then if you need to modify either the On or Off time it will not affect the other.

 

 

Rand

Link to comment
Which would work, but it will be turning off the Backyard any time you are outside of the 30 minute window. We don't want that, do we?

 

Hey Rand -

 

That's what I had thought too, but it's not the case.

 

I run the following code for my front door lights:

 

If
       From    Sunset  + 20 minutes
       To       9:30:00PM (same day)

Then
       Set Scene 'FrontDoor' On

Else
       Set Scene 'FrontDoor' Off

 

 

I can turn them on any time of the day, and they will stay on.

 

I believe the conditions are evaluated only twice (at the start time, and at the end time) - not continuously.

Link to comment

MikeB,

 

You are absolutely right, when entering a time range that time range becomes True, when leaving a time range it becomes False. Entering and leaving a time range are events that cause the program to run (either Then or Else path depending on all the If conditions).

 

Check out this post if you want to keep something on (or off) during a time range:

 

http://forum.universal-devices.com/viewtopic.php?t=394

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

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