The wake_on_lan integration does not support any configuration parameters

Hello

I’ve used WOL for a long time, but now I’ve encountered an error on the log.

Logger: homeassistant.helpers.config_validation
Source: helpers/config_validation.py:1112
First occurred: 15:24:53 (1 occurrences)
Last logged: 15:24:53

The wake_on_lan integration does not support any configuration parameters, got {'switch': [{'platform': 'wake_on_lan', 'mac': '08-bf-b8-6f-16-83', 'name': 'server', 'host': '192.168.3.31'}]}. Please remove the configuration parameters from your configuration.

I’ve tried the configuration 4 different ways after searching for the answer on the internet:

wake_on_lan:
  switch:
    - platform: wake_on_lan
      #      mac: "08-BF-B8-6F-16-83"
      #      mac: 08-bf-b8-6f-16-83
      #      mac: 08:bf:b8:6f:16:83
      mac: "08-bf-b8-6f-16-83"
      name: "server"
      host: "192.168.3.31"

I don’t know if it’s a new error, haven’t been paying attention to the logs.
But the configuration appears accordingly with what I read on the integration page.

Am I missing something?
I looked for the error on other topics and what I found was long ago and I tried their solutions without a positive result.

Can anyone help?

i thought wake_on_lan was declarative by itself, and the switch configuration isn’t supposed to be a parameter of it…

wake_on_lan:

switch:
  - platform: wake_on_lan
    #      mac: "08-BF-B8-6F-16-83"
    #      mac: 08-bf-b8-6f-16-83
    #      mac: 08:bf:b8:6f:16:83
    mac: "08-bf-b8-6f-16-83"
    name: "server"
    host: "192.168.3.31"

thank you.

changed to this:

wake_on_lan:
  #      mac: "08-BF-B8-6F-16-83"
  #      mac: 08-bf-b8-6f-16-83
  # mac: "08-bf-b8-6f-16-83"
  mac: "08:bf:b8:6f:16:83"
  name: "server"
  host: "192.168.3.31"

but I get the same error

I guess I was getting the wrong impression, this works:

switch:
  - platform: wake_on_lan
    mac: "08:bf:b8:6f:16:83"
    name: "server"
    host: "192.168.3.31"

Thank you for the heads up

So you don’t use the “wake_on_lan:” before anymore?

hmm… why did you change it? neither of the code you posted are identical to what i had posted.

the first one is just incorrect.
the second one create the switch but does not enable wake_on_lan.

if you want both, you should use what i posted verbatim.

because with the indentation I got an error.
But, as you wrote, I don’t

I wasn’t aware that without the indentation it would mean that they weren’t connected.
I read that in yaml, there are lists and dictionary data, like this you have two lists that I though weren’t related.

hadn’t tried it though, the computers aren’t configured yet. Changed it to:

wake_on_lan:
switch:
  - platform: wake_on_lan
    mac: "08-BF-B8-6F-16-83"
    name: "server"
    host: "192.168.3.31"

Thanks for the update