Jump to content

programming advice


tome

Recommended Posts

Posted

I am experimenting with programming lights reacting to a motion sensor.

 

I have one condition that creates a problem in the logic I used. That is, if someone physically turns on the switchlinc during the day, my lights go on and stay on - Good. If they turn on the switch in the evening, my lights go on and stay on - Good. But, if they turn on the lights before evening, and evening comes (sunset on the ISY), the lights will go off....

 

I want to keep track if someone turns on a switchlinc before "evening" (aka prior to sunset) and if so, use that fact in an If statement after sunset.

 

I have a program named ControlStatus:

 

If 
   From Sunrise
   To Sunset (same day)
And (
       Control 'Foo' is switched on
       Or Control 'Bar' is switched on
     )
Then
   - No Actions
Else
   - No Actions

 

This will be true if someone switches on a light before sunset but will get re-evaluated and be false after sunset. How can I prevent it from being re-evaluated so that I know the switch was turned on earlier?

Posted

Hi Tome,

 

I love folders! What I would do is create a folder with the condition for Sunrise to Sunset. I would put everything that needs to happen ONLY between sunrise/sunset in that folder. So, now the programs in that folder are ONLY evaluated when time is between Sunrise/Sunset. As such, if someone does anything outside this range, none of the programs therein are evaluated.

 

With kind regards,

Michel

Posted
Hi Tome,

 

I love folders! What I would do is create a folder with the condition for Sunrise to Sunset. I would put everything that needs to happen ONLY between sunrise/sunset in that folder. So, now the programs in that folder are ONLY evaluated when time is between Sunrise/Sunset. As such, if someone does anything outside this range, none of the programs therein are evaluated.

 

With kind regards,

Michel

 

Thanks for the tip, Michel! I will give it try.

Tome

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