I think the underlying net command used for shutdown allow for operations like hybernate and reboot.
Please add a way to invoke these shutdown-like operations.
Indeed hybernatem when supported by target pc, is the most safe operation to do on a computer of an unpredictable state (maybe with unsaved documents for example).
Unfortunately the net rpc command does not support sleep. See: https://github.com/home-assistant/addons/issues/976#issuecomment-573761145. That comment contains an alternative that works well for me.
1 Like
I read somewhere that net rpc
supports other shutdown flags as -r
and -h
but it’s likely that was only an hope.
I’m using HASS.Agent. I find it much more reliable and packed with features.
1 Like
Sound promising. Does it require MQTT broker or what?
Yes, it requires MQTT.
Where as the workaround I posted is one shell command:
shell_command:
turn_off_computer: 'curl -k http://192.168.xxx.xxx:8000/?action=System.Sleep'