Custom command when going to sleep / waking up

Is it possible to execute a custom script when going to, or leaving sleepmode? would be great if you could make something yourself that turns the tv on and off



Nothing like that right now. Sorry.

I’ll move this to the suggestions section.