Rule on event requiring persistance for at least x time before taking action

So I’m using the RuleEngine to trigger mode changes based on presence arrival/departure and so far, so good.

There is one challenge though; being in the city, sometimes I move in/out of the geo fence without really getting home.

On my past SmartThings, they had the notion of executing a condition only after X time has it persisted.

So, in this case; wanting to see a logic like:

  • when the trigger for presence arrival is true, and has not changed for at least 300 seconds
  • then set mode to home

Because if I just do a trigger on presence arrival, and I add a wait condition, if my presence leaves, the rest of the actions will still continue unless I add a subsequent condition to verify if presence is still true.

Use a condition rule instead of a trigger rule that you can specify a delay actions with cancel on truth change. If you have multiple actions for the mode change you can use a "delay actions with cancel on truth change" instead of delay the individual action like I showed in the example.

1 Like