Allow turning off switch only after x minutes

There’s probably a way to do it with the switch last changed attribute and this: