Is there a way for HA to know when my computer goes to sleep?

I’d like to trigger the lights to switch off if the pc goes to sleep / screensaver. Does anyone know whether or not this is possible?

If so please help me out, just got a whole bunch of xiaomi sensors and want to create some automations!

I use ping sensor do detect whether my desktop is on or off (including sleep) and it works quite well.

1 Like

Thank you, I’ll definitely look into this.
:+1:

EventGhost may do what you want.