LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.47k stars 65 forks source link

Misc: Sensors and commands become "unavailable" when PC is sleeping/hibernating #376

Open arielwulkan opened 7 months ago

arielwulkan commented 7 months ago

I’m currently using HASS.Agent to monitor and send commands to my PC. My goal is to automate shutdown computer when it’s sleeping after some time. The problem is that when PC is sleeping or hibernating, all PC sensors and commands become “unavailable” on the integration. Any ideas on how to solve that?

Also how could I know if PC is sleeping/hibernating or shutdown?

loryanstrant commented 6 months ago

This is expected behaviour, as the process is not running when it's sleeping, and most definitely not running when it's hibernating. If you want it to happen after a certain period of idle time, then you need to prevent the computer from going to sleep or hibernating. Otherwise, if it's sleeping or hibernating - you can't tell it to do anything.