In reference to what I posted in the now-closed thread here: Multi Hub Task Splitting - #30 by Alan_F
The rule failed again despite moving some of the logic to a helper rule and a hub variable. I think I'm giving up on 'Wait for expression' in any rule that has a required expression that can go false.
Unfortunately I only had Action logging on for the rules, as I turned off the event and trigger logging when I set up the helper rule, so I'm expecting this will again be dismissed without investigation, but just in case, here are the logs I have:
The primary rule is app 18. The helper rule is app 52.
The older entries at the bottom show the rules working correctly last night. At 9:01 PM the primary rule began to wait for the hub variable to change. At 12:04 AM the other rule set the hub variable to false and the primary rule logged the "Wait for expression over" before finishing its actions.
The primary rule triggered again at 6:22 PM. At 7:00 PM the helper rule set the variable to false. The primary rule didn't react.
Primary rule:
Helper rule:
I think the only approach left (other than moving this to Node Red) is to use 3 rules... one to take the initial action (the first part of my current main rule), one to wait for the conditions (my current helper rule) and a third one to take the action(s) that need to happen after the "wait" is over.
The new main rule will be the first part of the current one, deleting the 'wait for expression' and the final action to reset the Powerwall reserve setting.
The helper rule will stay the same. It will trigger once the 'wait for' conditions are met and set the hub variable back to false
The new third rule will trigger when the hub variable changes from true to false. It will set the Powerwall reserve level back to correct level.
While using 3 rules instead of 1 seems a bit cumbersome, I think I prefer it to the repeating loop workaround proposed by @vitaliy_kh