2025-05-13, 08:31 AM
I've just found this as well which is an alternative to my code if you want some choice. If I had found this first it may have saved me a couple of weeks of coding and testing. I have not tested the below, but thought I would add it here for information.
https://github.com/bulletmark/sleep-inhibitor
https://github.com/bulletmark/sleep-inhibitor