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.54k stars 67 forks source link

Both sleep/hibernate options only hibernate pc, can't put pc in sleep state #275

Open erbmur opened 1 year ago

erbmur commented 1 year ago

Hello, I am running windows 11 along with agent 2022.14.0. I have setup two commands, one to hibernate, and one to sleep on hass.agent. No matter which one i pick, the computer will hibernate, there doesn't seem to be a way to get it into a sleep state. Is there a seperate option I am ment to click somewhere to get the sleep state to work as well as hibernate? Thanks in advance!

backslashV commented 1 year ago

Having the same issue. The app description says if hibernate is enabled, sleep will just hibernate the PC. I have hibernate disabled in the power options, but still sleep hibernates the PC.

backslashV commented 1 year ago

For now, I came up with this solution to put the computer to sleep without any extra software. I am using a MultipleKeys button with these keycodes: [^{ESC}] [{TAB 5}] [{RIGHT}] [{ENTER}] [{DOWN}] [{ENTER}] [{ESC}]

loryanstrant commented 1 year ago

This is actually a Windows by design feature that I've had to find the hard way. I've used this registry key on to disable every sleep & hibernation mode possible: reg add HKLM\System\CurrentControlSet\Control\Power /v PlatformAoAcOverride /t REG_DWORD /d 0

It's worked previously on a Windows 10 & Windows 11 device, as it would stop them going to sleep or hibernation when I'd turn the display off, however on my most recently installed machine it's putting it to sleep - so I'll need to play around some more.

GOUKI9999 commented 1 year ago

same issue

Shiu commented 2 weeks ago

Old issue, but I was experiencing the same. Disabling Hibernation via Command Prompt with powercfg.exe /hibernate off did the trick. Disabling hibernation from the Control Panel was not working