RPC Shutdown

I have been trying to create a WOL / Shutdown switch for my PC.

I have been partly sucessful.

Code:
switch:

  • platform: wake_on_lan
    mac_address: “2c:xx:xx:xx:xx:xx”
    name: “PC”
    host: 192.168.1.112
    turn_off:
    service: hassio.addon_stdin
    data:
    addon: core_rpc_shutdown
    input: PC

With this code, I am able to turn off the PC, but the WOL wont work. If I remove the code from: turn_off: and all the code below it, I am able to turn the PC on, but of course not turning it off, since that part of the code is missing.

What do I need to do, to make both commands work?

Thanks in advance

First off format your code correctly.

As they work independently they likey are configured correctly. You just have a formatting issue when they are both put in place.

See below for an example of properly formatted code

switch:
  - platform: wake_on_lan
    name: PC
    mac_address: "2c:xx:xx:xx:xx:xx"
    host: 192.168.1.112
    turn_off:
      service: hassio.addon_stdin
      data:
        addon: core_rpc_shutdown
        input: PC

Been trying this now. Same problem :frowning: