Inspired by our Fearless Leader
and his exhortation to not throw trigger information away, I just simplified my "Generator active" rule (wait and retest the acceleration sensor to make sure it's not a false trigger, then set a virtual device to match the condition) from this:
Trigger: Generator sensor CHANGED
IF (~ Generator sensor inactive(T) [TRUE]) THEN
Cancel Delayed Actions
inactive() on Generator virtual sensor
ELSE
Delay 0:00:10 (cancelable)
IF (~ Generator sensor active(F) [FALSE]) THEN
active() on Generator virtual sensor
END-IF
END-IF
to this:
Trigger: Generator sensor ACTIVE
Delay 0:00:10
IF (~ Generator sensor active(F) [FALSE]) THEN
active() on Generator virtual sensor
Wait for condition: ~ Generator sensor inactive TRUE
inactive() on Generator virtual sensor
END-IF
Thanks, Bruce!