Questions about defining rules


#1

Hi All,

Two questions:

  1. Is there any way, when defining a rule with a lot of conditions, and making a mistake, not to have to start all over again?
  2. In the example below, can I make one subrule with (days AND Time OR Time) or do I have to make two subrules, like I did?


#2

This is not an answer to your question, but does this work OK for you?
The reason I'm asking is I had something very similar.
If you look at the settings for the rule (cog to the left of the rule in the rule list) I would see an event for midnight. This is because it will evaluate the day at midnight. When I had this even though the rule was false at midnight, it would evaluate to true and turn the lights on. This is in RM 2.5 and 3.0.
The only way round it for me was to define a 'weekend' virtual switch. On at the weekend, off during the week. So instead of Mon, Tue, Weds, Thurs, Fri, I had weekend switch OFF. Sat and Sun, switch on. This was set by a separate rule just for the weekend switch.
This was the only way round the issue for me,
image


#3

Not that I have found.

You can nest subrules.
Something like: -
Illuminance
And
Mode
And
(
(A and B)
OR
(A and C)
)

Is this what you mean?


#4

Thanks for confusing me even more! :joy:
I've only had my Hubitat for 10 days now. Still learning...

What I have learned is that it's very wise to switch all logging off. Then switch on logging for your rule and check it out. I've solved a lot of problems (and typo's) that way... Also, be careful when playing with sunset/sunrise times - I don't know where you live, but over here, where it differs like 5 hours between summer and winter, one's rules can go a little haywire...


#5

What I was wondering about, is wheather it's possible to say

And
Mode
And
(
(A and (B or C))
)

(It's not too important, just a little shorter that the other way...)


#6

This is what I was thinking.
Is this what you are after.

image


#7

Yes! Thank you.