Jump to content

if and or question


flemingmike

Recommended Posts

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)


Link to comment

"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?

Link to comment

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.

Link to comment

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



Link to comment

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.

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.3k
×
×
  • Create New...