How to create a rule with IF/OR statement for both time of day and week

In my simple kettle rule, a virtual switch is triggered from google which turns on the actual switch of a zigbee outlet. The outlet doesnt have power monitoring so i just use a delay of the average time to boil.

Part of this currently is to announce when the task is complete on all speakers.

However, id like to set the rule to announce on just one device if its a weekday AND before 9AM, as to not announce it to the world, just the kitchen and anytime after 9AM revert back to all speakers.

Then within the same rule, if it is a weekend be able to have the same kind of thing but different times.

image

Something like this. Use a condition with days of week and time of day. This would announce on one device Monday thru Friday from 5 to 9AM and on two echoes all other times.

Thanks, was trying to do something like that but had a hard time with the UI, not the language itself. Got part of it working now but still cant work out a seperate weekend OR statement.

If i try to add an OR after the IF Days of weekday/time so that i can have weekends/time also it moans about ending operator?

Think i got it, UI misunderstanding again.

Does this look ok?

image

You probably need to add parenthesis into your if. Edit the actions and then edit the if statement. Then click edit expression. In that area you can click "insert before expression element". You can then add a opening "(" before Day Sat or Sun, and then add a close ")" at the end.

After you add the first "(" it will give you a error but as soon as you add the final close ")" it will be okay.

1 Like

like this?
What do they do?
image

It groups the statements.

IF (X AND Y) OR (W AND Q).

1 Like