Wake_on_lan switch -> How to get the status (online/offline) of the host - Google Home

Hello all,

I’m very new to HA.

My first config is my wake_on_lan switch:

switch:

  • platform: wake_on_lan
    name: “Desktop”
    host: “192.168.1.254”
    mac_address: “2c:fy:a1:21:5d:59”

It work when I say “Hey google, turn on Desktop” and I can see in HA if the host is online or offline
I will start doing the turn_off in a few days.

Now I have 2 questions:

1 - There is any way to turn on / off the switch automatically if the host is online/offline?

2 - There is any way to get the status of the host with Google Home like: “Hey google, status of Desktop” and the answer is online or offline

Thanks for your help

  1. That should happen automatically. Mine does and my wake on lan switch configuration is identical to yours.

  2. Not sure, I don’t use google home.