I want to be able to have my bedroom lamp come in the morning during the weekday and every night during the week. I tried to do this all in one rule, but the light does not come on at night. I attached a screen shot of my rule.

You need parenthesis. Enable complex rule input and group the conditions as follows:

**(** Time between 7:30am and 8:45am

AND

Day in [Mon, Tue, Wed, Thu, Fri] **)**

OR

Time between 9:00pm and 10:30pm

Similar to the following:

Thanks. I tried to that but no luck. Maybe it is because the days of the week for the morning light?

You enabled the complex input but didn't add the parenthesis.

**Select Enter subrule for left (this adds the left parenthesis)**

Time between 7:30 and 8:45

AND

Day in [Mon, Tue, Wed, Thu, Fri]

**Select End of subrule (this adds the right parenthesis)**

OR

Time between 9:00 and 10:30

That worked like a champ!!! Thanks for the help and I am still in my learning curve.

Glad it worked! Here's some good info on why parentheses are required for something like this:

So if you have the format like your original...

A

AND

B

OR

C

...if A is false, evaluation stops and the entire rule is false (your initial problem). If A is true, B is checked. If B is true, the entire rule is true since B comes before OR. If B is false, C is checked. If C were true the rule would be true, but in your case C and A would never be true at the same time.

When you add the parentheses, it evaluates inside first and aggregates it first.

(A

AND

B)

OR

C

Now if either the combination of A and B is true, or C is true, the entire rule can be true, which is what you were after.

Hope this makes sense.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.