My first attempt at rule machine. I'm trying to simplify the event handling to reduce the load.
I thought of using "wait on event" to rewrite the following rule. However, I don't think that model fits what I'm trying to do.
In words, this rule is: if the UPS is on battery and less than 5% battery remains, shut down. However, if the UPS is low but back on mains (this can happen if it restarts after a power failure and the hub restarts as well), watch out for a another power failure occurring before the battery is charged over 5%, and shut down if that happens.
In my attempt to make this simpler, I changed the trigger events, which allowed me to simplify this greatly. Did I do it correctly?