I wanted to turn off the screens of my PC when I left my room and turned off the lights, so I made an app which listens for MQTT events.
You can also set it to lock your PC, so you can, for example, make an automation to stop anyone using your PC when you leave home.
It’s been working flawlessly for me but I spent the weekend polishing it up and writing docs so y’all can use it too if you want. The features are quite basic. I’ve only tested it on Windows 10. If it works or doesn’t on your Windows, let me know. I’ve licensed it with an open source license (Apache-2.0, same as HA uses).