Using Hass-agent I’ve got a script that will put a windows computer into hibernate mode. If I run this script manually it works. The last step of configuring it as the “off” component of the WOL switch is what I am struggling with. I have tried a few different approaches but none of them will trigger my hibernate script.
It’s a script in HA. It turns on a switch that HASS.agent provides via MQTT to make the windows computer hibernate.
Manually calling the script in HA works fine and the computer hibernates. Using WOL, I can turn it back on - I just can’t seem to configure WOL to call the HA hibernate script. When I look at the script in HA after I do the WOL turn_off - I can see it didn’t invoke my HA hibernate script.
In HA, when you edit the yaml configuration files you always need to do an HA restart. When you do this, you have the option to just reload all the yaml configuration files (sort of a “fast” restart). Normally this works when you have made changes to these files - but not always. I’ve had this before where changes to config.yaml (or similar) required a complete HA restart to take affect. And that’s what was required this time. Once I did a full restart of HA everything started working.