There is a simple/reliable Auto-Off app available that you can use for this if you want to...
I have it configured to manage a number of switches that I want to go off at a predetermined period after being turned on. One example, our whole house fan. Works w/switches and plugs.