Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fixed Time AND Sunrise Conditional

Featured Replies

Posted

I want to turn a light on:

- if today is M,T,W,T AND

- if the time is 6:50AM AND

- if sunrise today isn't earlier than 7:10AM

 

Maybe I just need more (or probably less) coffee, but I just can't seem to wrap my head around how the 3rd condition could be written within the available ISY syntax. Basically, I don't want to turn on the light if sunrise is just 20 minutes away from the fixed time.

 

Can anyone offer a suggestion? Its probably a case of not yet fully grasping the many ways ISY programming can be done. Thanks for your patience and help!

 

Rod

For the simple case of turning a light on at 6:50AM, and off at Sunrise:

 

Turn Light On/Off:

If
       On Mon, Tue, Wed, Thu
       From     6:50:00AM
       To      Sunrise (same day)

Then
       Set 'My Light' On

Else
       Set 'My Light' Off

 

In your case, you do not want the light to come on if its only going to be on for 20 minutes or less. You need two programs for this:

 

Turn Light On:

If
       On Mon, Tue, Wed, Thu
       From     6:50:00AM
       To      Sunrise - 20 minutes (same day)

Then
       Set 'My Light' On

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

 

Turn Light Off:

If
       On Mon, Tue, Wed, Thu
       Time is Sunrise
   And Status  'My Light' > Off

Then
       Set 'My Light' Off

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

  • Author

In regard to the TO sunrise conditional "sunrise - 20", if the time this evaluates to is earlier than the FROM conditional fixed time, does the whole IF section evaluate to FALSE, which then runs the ELSE option[/b]?

If the TO is earlier than the FROM then it will never change TRUE or FALSE, and will not run either the THEN or ELSE path.

 

In the normal case where the TO is later than the FROM, the schedule evaluates TRUE when the FROM time is reached (Runs THEN path), and FALSE when the TO time is reached (Runs the ELSE path).

  • Author

AH!! I see...

 

So to summarize what I think I understand:

 

- the Schedule evaluates to TRUE when the FROM conditional is TRUE and the TO conditional evaluates as later than the FROM conditional, and therefore initiates the THEN action

 

- the Schedule stays TRUE until the TO conditional evaluates as TRUE and later than the FROM conditional, at which time the Schedule goes FALSE, and therefor initiates the ELSE action

 

- whenever the TO time conditional evaluates as earlier than the FROM time conditional, even if the FROM conditional evaluates as TRUE, then the Schedule does not toggle its logical state (is this right?)

 

Thanks!

Rod

AH!! I see...

 

So to summarize what I think I understand:

 

- the Schedule evaluates to TRUE when the FROM conditional is TRUE and the TO conditional evaluates as later than the FROM conditional, and therefore initiates the THEN action

 

- the Schedule stays TRUE until the TO conditional evaluates as TRUE and later than the FROM conditional, at which time the Schedule goes FALSE, and therefor initiates the ELSE action

 

- whenever the TO time conditional evaluates as earlier than the FROM time conditional, even if the FROM conditional evaluates as TRUE, then the Schedule does not toggle its logical state (is this right?)

 

Thanks!

Rod

 

Yes, all three of your points are correct.

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.