Jeff, I implemented something similar in a SmartApp that monitors my garage fridgerator. You can review the entire post here:
In that article is a link to the SmartApp code as well as here:
Basically I set a state variable with a time stamp and then compare it to a threshold to determine if I need to perform an action.
I hope this helps.
1 Like