This is my first rule using required expressions. its a simple rule but just wanted to get advice as to whether I wrote it simply or could it be simplified further? Or maybe I dont even need the required expression? I noticed there is a toggle for it when you start the rule?
The rule goal is to turn on my boiler between 1202pm and 358pm Mon-Fri.
@jasonbalsor since Hubitat is an event driven systems and time triggers are about the simplest events that only fire once a day, you don't need "Time between..." Required Expression. That type of Required Expression would be good for something like a motion or contact sensor that is triggered throughout the day. Here is another example to simplify your rule:
Required Expression
Day in [Monday, Tuesday, Wednesday, Thursday, Friday]
Trigger Events
When time is 12:02 PM
Actions to Run
On: Boiler Enable
Wait for event: When time is 3:58 PM
Off: Boiler Enable
Trigger 1: The rule will trigger at M-F at 11:02 and the time will always be between 11:02 and 6:58 when the rule triggers.
Trigger 2: The rule will trigger Saturday at 12am and Sunday at 12am. The time will always be between 11:02 and 6:58 when the rule triggers.
At @pseudonym says, the rule is triggered when the event happens. But the event is a point in time, not a period of time. So when the rule is triggered, the IF statement is evaluated AT THAT MOMENT (or technically fractions of a moment later) but not again until the rule is re-triggered.
I'm guessing you could use either the simple automation or basic automation tools to do this without much aggrevation... unless you're just trying to understand RM, which is certainly a worthwhile pursuit!
@jasonbalsor it's been a while since I've looked at a 2.5 rule so let's look at what you want to happen.
Turn on Monday at 11:02 PM then turn off Tuesday at 6:58 AM?
Turn on Tuesday at 11:02 PM then turn off Wednesday at 6:58 AM?
Repeat for Wednesday on / Thursday off?
Repeat for Thursday on / Friday off?
Stay on all day Saturday and on all day Sunday?
Do you want it to go on at 11:02 PM on Friday then turn off Monday at 6:58 AM?
Trigger Events
On: Mon, Tue, Wed, Thu, Fri at 11:02 PM
OR
On: Mon, Tue, Wed, Thu, Fri at 6:58 AM
Action to Run
IF (Time is 11:02 PM) THEN
On : Boiler Enable
ELSE-IF (Time is 6:58 AM) THEN --- or you can just use an ELSE here
Off: Boiler Enable
END-IF
As there is nothing for Saturday or Sunday, Boiler Enable should be On all weekend.