Is there an integration with Microsoft Windows? (computer or program status/actions)

I’m looking for a way to see the status of my computer and take some actions on it. Examples:

  1. See whether the desktop is locked (i.e., whether I am at the computer actively using it)
  2. Sleep, hibernate, shut down computer
  3. Mute, change volume or audio output device
  4. Open, close, force close applications

#1 is my top priority at the moment because I’d like to use that as presence detection alongside a thermometer sensor for controlling lights, fans, and a space heater (I know there are other avenues for presence detection, but this would work very well for me and my computer is already here).

I searched the community and came across PyWinIoT, but it doesn’t have what I need and looks like it hasn’t been touched in over a year.

Check out HASS.Agent on HACS.

This looks very promising! Thanks!