First of all, thank your for the code - it's a very useful daily helper ;-)
Could you add the ability to optionally call some action after "turned of"? This would be very helpful, eg for notifications or further scripts / actions.
It would be enough to have a custom yaml / template block after "turn off" is fired.