I have my dock plugged into a smart plug and the laptop set in the BIOS to turn on when it receives power. I have an NFC tag on my coffee machine that I bloop while I’m making my morning brew, and that turns the dock on so that everything’s ready when I move into the office.
For turning things off I have HASS.Agent installed and sending state updates (locked, unlocked, etc, which is useful for other automations) and when that sensor goes unavailable for 15 minutes it turns the plug off. I find that’s long enough to allow it to reboot for updates and what not.
The sensor does report shutdown, reboot, and sleep states but I found that it often happens too quickly to get the change sent, so the unavailable state is more reliable.
I’ll have to have a look when I’m next in the vacinity but I’m pretty sure I have an APC Easy UPS on mine and it works out of the box.
Let me get back to you…
Update: It’s an APC Back-UPS 850. No doubt the instructions banged on about requiring Powerchute but I just plugged it into the Syno and it worked fine. You do need to enable UPS support on the NAS itself of course, from Control Panel/Hardware & Power/UPS, and set it to USB UPS.