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.

if and or question

Featured Replies

Posted

does this make sense?

 

If
       (
            Control 'Other / Krista's Keypad - G' is switched On
         Or Control 'Other / Mike's Keypad - G' is switched On
       )
   And From    Sunset  +  1 minute
       To      10:30:00PM (same day)

Then
       Run Program 'G - All Off Night' (Then Path)

Else
       Run Program 'G - All Off Day' (Then Path)


  • Author

i feel like this will run the "all off day" alot.

The Else will run at 10 PM and when either of the two KPL buttons are pressed On and not within the time range. If that is not the desired result put the Else Action statement in another Program that triggers specifically at 10 PM.

  • Author

what i want to accomplish is if mike or kristas keypad g is pressed between sunset and 10:30pm i want the all off night program to run. if mike or kristas keypad g is pressed any other time i want the all off day program to run.

"what i want to accomplish is if mike or kristas keypad g is pressed between sunset and 10:30pm i want the all off night program to run. if mike or kristas keypad g is pressed any other time i want the all off day program to run."

 

That is what I would expect to happen. Is that not what is happening?

  • Author

it seems to run the else at sunset and 10:30. let me verify tonight that nothing else could be triggering it and i will update tomorrow.

That is correct. A Schedule From/To causes the Program to trigger at the From time and the To time. The clause that runs is determined by the True/False of the If conditions.

 

If that is not what is needed put the Else logic in another Program in the Then clause with positive (True) is conditioning.

Try these two programs

 

 
If
       (
            Control 'Other / Krista's Keypad - G' is switched On
         Or Control 'Other / Mike's Keypad - G' is switched On
       )
   And From    Sunset  +  1 minute
       To      10:30:00PM (same day)

Then
       Run Program 'G - All Off Night' (Then Path)

Else
       - -blank


If
       (
            Control 'Other / Krista's Keypad - G' is switched On
         Or Control 'Other / Mike's Keypad - G' is switched On
       )
   And From    10:30:01PM 
       To        Sunset  +  59 seconds (next day)

Then
       Run Program 'G - All Off Day(Then Path)

Else
       - -blank



I think I, too, would break this into two programs:

 

If
                    Control 'Other / Krista's Keypad - G' is switched On
         Or Control 'Other / Mike's Keypad - G' is switched On

Then
       Run Program 'time' (if Path)

Else

 

time program

 

If
       Time is from    Sunset  
       To      10:30:00PM (same day)

Then
       Run Program 'G - All Off Night' (Then Path)

Else
       Run Program 'G - All Off Day' (Then Path)

 

The time program must be disabled.

Guest
This topic is now closed to further replies.

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.