Wake on Lan should be reclassified as a "button"

WOL now is a “switch”, but it’s not a switch. You push the button, it sends a WOL command. Now I have to turn the “switch” on and off needlessly.
Good idea?

It is explained very well in the documentation.

Adding a shut down command to your switch will make the button act as a real button. So press once it will turn on your pc, press again and it will log you off and turn off your pc.

You must have commands to shutdown your pc remotely via the CLI or download IoT-Link if you use a windows computer which is the easiest option and uses mqtt.

jimz011 I don’t follow what you are saying.
Per the documentation, Wake on Lan sends a magic packet to wake a PC from sleep. The function is “wake” not turn off. You are describing an edge case where someone may want to turn off, say, a Linux computer. That’s not what WOL is designed to do.
The “turn_off” variable is an add-on to a well understood simple function, WOL. That add-on function shouldn’t drive what this does, which acts as a button to turn on PCs.
What I’m suggesting is new, since the “button” entity is new. It’s an obvious change to a button function like WOL. That’s why I’m suggesting this. Seems obvious.

This is how I use ‘Wake on lan’

  - platform: template
    switches:
      desktop_francis:
        value_template: "{{ is_state('binary_sensor.desktopfrancis', 'on') }}"
        turn_on:
          - service: wake_on_lan.send_magic_packet
            data:
              mac: '00:1a:92:e9:74:f5'
        turn_off:
          - service: mqtt.publish
            data:
              topic: iotlink/workgroup/desktop-francis/commands/shutdown
        unique_id: 6d987d00-b390-4f57-ad25-9ca17ddb8958    

So you created a switch with WOL for ON and an IoT-link for off, there’s nothing wrong with that. However, as OP stated, the WOL-function on itself should be a button, not a switch.

That’s not how it used to be and how it is documented at the moment, but it is a logical consequence of the addition of the button-entity to Home Assistant and a perfect use-case of this new entity.

When we only had switches, everything was a switch. Now we have buttons and switches, so all switches that were actually buttons all along, should be redefined :wink:

5 Likes

I agree 100%. Wake-on-LAN is not a an On/Off operation, it’s a signal, it does ONE thing, it sends a magic packet with a specific MAC address in it. Please fix this.

3 Likes

still nothing right? I always need to press it 2 times to be sure that I did send the command.

I assume this should be posted in GitHub. Nobody ever responds to feature requests here. This is actually more of a bug.

Agree with the idea. I’m assuming nothing happened in the last year?