I have tried a few different things. This is the latest. I want to close a blind if it's between 3:00 and 5:00 pm, the temperature is about 72° and the LUX measurement is above 300 lux. It works AT 3:00 but not after?
Enable all logging for the rule (if you disabled it; it's on by default), then look at the output of Logs, filtered to just this rule (or perhaps this rule plus other device events that seem relevant), or share them here for clues.
That being said, I'd also think through what you really want to happen, since your current explanation leaves some room for interpretation, and Rule Machine is a robot that can't think like a human, so you'll need to be equally precise there.
For example, do you want anything to happen at exactly 3 PM (or 5 PM) if your conditions are (or aren't) met, or just the first time they become true after that?
You can also eliminate some duplication: you don't need to check illuminance in your actions since your conditional trigger is already doing that (i.e., that IF would never be reached if lux weren't already >= 300 in the first place). Same with temperature; that's already your sole trigger event, so no need to check the state that would have resulted from the only event that could have possibly caused the actions to run (unless you are doing this from another rule manually, etc. and do need to have it there, not apparent from your description). Neither would cause your problem as far as I can see, but logs will be more illuminating for sure, and they'll make the rule simpler to look at. (You're also missing an END-IF, which again won't cause problems in this case but is a good habit to get into for where it might.)
One issue I have is I can't seem to find an "end-if" statement.
This was easier with RPG IV! lol It took me a while to even find the end-if. I have to click end rep first before the end if came up. I am trying to close the blind if at any time between 3-5 pm, the temperature is above 72° AND the LUX goes above 300. The LUX may only go up at say 4:00 PM. Is this better? I have to wait to see the log now. I try to keep logs off unless it's a new routine and I totally spaced even thinking about the log! lolI think what you want to do is monitor the temperature and LUX , and if temperature is >72 AND LUX is >300, AND time is 3-5 pm, then begin the rule.
Since the conditions will be true at the time of the trigger, the rule will close the blind immediately.
Then every 30 minutes, for up to 2.5 hours (30*5 but ending at 5pm due to the conditions) you will recheck if the conditions are still true, but you don't do anything if they aren't still true. I assume you would perhaps open the blinds in that case.
Since the rule is repeating in a loop, and it is managing the 2.5 hour timer, you want to use private Booleans to prevent subsequent temperature and LUX changes from creating multiple instances of the rule from running.
And Rule Machine runs on pure logic and thinking (unlike a human) - there.... fixed it.
So, the issue I see here is that you don't have anything in your repeat block.
It looks like you want to start checking at 3PM to see if your illuminance is >=300 AND the reported temperature is >= 72. If so, you want the blinds to close. You also want to repeat the check every 30 minutes.
If it were me, I would tackle this a completely different way.
I would keep the Between 3 and 5 PM as a required expression, and select the option to cancel pending actions when the condition becomes false.
Then, I would trigger at 3 PM OR if the blinds open and immediately start your repeat block. I would choose repeat while blinds are open (I put in 5 minutes, but you can use any time length you would like)
The first action would be your current IF statement, then close the blinds and stop repeating actions if true.
If the blinds get closed, it exits. Otherwise, it checks again until the condition is true or the required expression becomes false.
If the blinds are opened again in the same window, it will trigger and start the same loop. If the blinds are already closed, it exits on the first loop.
Here's an option to consider.
Trigger Events
When time is 3:00 PM
Actions to Run
Repeat every 0:15:00
IF (Illuminance of Lux is >= 300 AND Temperature is >= 72) THEN
Close: Living Room Blind
END-IF
Until (Time is 05:00 PM)
I would make blind being open part of your required expression with the time period. Then make your trigger events just be when temperature OR Lux changes.
Then keep your if statement that checks the temp and lux limits are met to open the blind.
That way it will always close the blind as soon the conditions are met if it is still open, instead of having to repeat or check back which will cause a delay.
That is why I suggested making it part of the repeat while loop. If it is closed, it exits and doesn't run again until it is opened.
I mean you are running it every 30 minutes. The delay I'm talking about is if the conditions are met one minute after that timer fires, as it will take 29 more minutes to close the blind after that.
Check every time your triggers change, and they close the blinds at the exact time the conditions are met. I don't see a need to repeat anything, if the rule fires every time the lux or temp changes to do the check.
Every 30 Minutes "WHILE THE BLINDS ARE OPEN"
it triggers once at 3 PM.
Then, it exits if the blinds are closed to begin with OR if the repeats close them.
It also triggers again if the blinds are opened again in the 3-5PM time frame. This allows it to restart if the blinds are subsequently open.
So, mine doesn't run but once, unless the blinds are open and doesn't require a conditional expression that includes devices you are intending to change the state of.
In my earlier reply I thought he included the 30-minute repeat as a method of checking if the Lux and temp thresholds had dropped below the trigger point. And if they had, he would once again open the blinds
After re-reading the OP, it looks like he wants to close the blinds the first time the temp and LUX exceed the thresholds, after 3 pm. Even if the temp and LUX drop below the trigger values, it seems that he still wants to keep the blinds closed.
That would require a very simple rule.
Make the required expression Time is between 3pm and 5pm, and blinds are open.
Keep the existing temp and LUX triggers.
The action is simply "Close the blinds" ( no If-Thens, repeats, or Private Boolean )
As soon as the temp and LUX thresholds are met, the blinds will close immediately. The rule will not be triggered again unless the blinds were re-opened within the 3-5pm period, followed by a fluctuation in temp or LUX.
Without adding the condition Blinds=Open, every single change in temp and LUX values, would cause the rule to retriggered. This could be many times a minute, which is unnecessary if he doesn't want to make any additional changes to the blinds, after the first execution of the rule.



