Race conditions: best practices in rules?

Yes you can use 2 rules with two different triggers
Or you can check for the state in the rule
Generally speaking "occupancy":false is not interesting as a trigger
Use the true trigger only and use a timer/expire binding to determine end of occupation

See:Design Pattern: Motion Sensor Timer

1 Like