RM actions based on hub systemStart

From Rule Machine, all you can do is subscribe to the systemStart event, which you could do by adding it as a trigger. I'm not really sure what your intent is with the pseudocode above (if the last system start happened before 1:00 AM? if the last system start was less than an hour ago?), nor am I sure why you'd want to do a "Cancel Delayed Actions" in that case, but this is one example of how you could effectively check whether the hub was restarted within the last hour. This uses a variable, but you could also use a virtual switch, Private Boolean on one or more rules (set from another rule, all assuming you aren't using PB for anything else in those rules), or lots of other things that might better suit your use case:

image

3 Likes