Here is my working switch:
switch:
- platform: wake_on_lan
mac_address: "AA-AA-AA-AA-AA-AA"
name: "Desktop"
host: 192.168.1.21
turn_off:
service: hassio.addon_stdin
data:
addon: core_rpc_shutdown
input: Desktop
This is the addon settings:
{
"computers": [
{
"alias": "Desktop",
"address": "192.168.1.21",
"credentials": "user%pass"
}
]
}
Make sure u set up windows correctly too.
- Start remote registry service
- Open firewal for WMI
- In registry set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy to 1 or add it.
I followed this guide http://blog.sip2serve.com/post/155565656901/shutdown-windows-10-remotely