Jump to content

Programming question


mitch236

Recommended Posts

Posted

I have a Scene that turns on a few devices based on the following program

 

If:

Module Climate Light <5

and From 4:00:00PM

To 8:00:00PM (same day)

 

Then:

Set Scene 'Outdoor Lights' On

 

Else:

Set Scene 'Outdoor Lights' Off

 

 

The problem I have is if I manually turn on one of the lights included in the scene and according to the above statement, the Else is running, it keeps turning off my lights.

 

Any better way of doing what I'm trying to do?

Posted

I believe that the weather module updates every minute or so, so it will fire this program each time it updates. You may want to use another program as a binary variable to indicate that you've already handled the "event" for the night. When the light falls below 5 for the first time (your variable program is false), you can turn on the lights and set this program to true. I would then create another program that turns off the lights at 8 PM provided that they were turned on by your first program (which you will know because you set your variable).

 

Make sense?

Posted

Hi mitch236,

 

In addition to brad's suggestion, you will have to note that this program is only run if the light level actually changes. So, for instance, if the light level was 5 and still remains 5, this program is not re-evaluated unless the time changes and comes within the range.

 

With kind regards,

Michel

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...