I was looking to do something similar a few months back with my auxiliary pool pump, which sucks ground water out from under the pool. I was able to accomplish it with Rule Machine.
However, Rule Machine has been pulled and the code is no longer available. You might be able to do the same thing with SmartRules.