Jump to content

Perpetual Loop


saflight

Recommended Posts

Posted

In the morning when I turn on (manually) the Family Rm Ceiling and then follow with the Family Rm Table (On) the Family Room Ceiling will turn off. If I reverse the sequence with the Table first followed by the ceiling light then both stay on. Why?

 

These programs run the previous evening.

 



If
Time is Sunset + 15 minutes
And (
Status 'Fam Rm Key - Ceiling' is Off
And Status 'Kitchen Ceiling Keypad - A' is Off
And Status 'Fam Rm Table' is Off
)

Then
Set 'Fam Rm Key - Ceiling' On

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



If

Time is 10:21:00PM

And Status 'Fam Rm Table' is On

Or Status 'Kitchen Ceiling Keypad - A' is On

Or Status 'Kitchen Ceiling Keypad - A / Kitchen Cabinets Upper - B' is On

Or Status 'Kitchen Pool' is On

 

Then

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

 

Else

Set 'Fam Rm Key - Ceiling' Off

Posted
Why?

 

The short (and flippant) answer is: because this is the way you have it programmed. I believe that your second program is the culprit here, and that it has to do with the priority of "and" versus "or".

 

Without knowing your intentions regarding these programs, allow me to offer a suggested change to your second program that I hope clarifies the priorities between "and" and "or":

If
Time is 10:21:00PM
And 
(
Status 'Fam Rm Table' is On
Or Status 'Kitchen Ceiling Keypad - A' is On
Or Status 'Kitchen Ceiling Keypad - A / Kitchen Cabinets Upper - B' is On
Or Status 'Kitchen Pool' is On
)

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

Else
Set 'Fam Rm Key - Ceiling' Off

 

As a further point that I hope is instructive, I DON'T believe the parentheses you have in your first program are necessary.

Guest
This topic is now closed to further replies.

×
×
  • Create New...