How to setup Rule

I am trying to setup a rule so that if I walk into my office and turn on the main lights that after 30 seconds my hutch lights come on, but if i leave within the 30 seconds and turn off my main lights the hutch lights do not turn on but rather remain off.

I setup this rule (see attached) but the hutch lights are still coming on after I turn the main lights off within a few seconds of having turned them on.

What am I doing incorrectly?


The "delayed" part, attached to the hutch on action, schedules that action to execute 30s later. The rule then proceeds to evaluate your conditional immediately, which comes up false, so the delayed action is not cancelled.

Instead, it sounds like you want one of the following sequences:
Hutch on > delayed 30s
Wait for event: office off, timeout 31s
Cancel delayed actions (no-op if the on already fired at 30s)


Delay 30s (as its own action)
If office on:
Hutch on