Invalid config for my switch

I’m trying to get wake on lan working but I keep getting the error Invalid config for [switch]: expected a dictionary. Got {‘default_config’: {}, ‘frontend’: {‘themes’: {}}, ‘automation’: {}, ‘script’: {}, ‘switch’: ‘-platform wake_on_lan mac 00:00:00:00:00:00 name PC wake_on_lan’}. (See ?, line ?).

my code is

# Loads default set of integrations. Do not remove.

default_config:

# Load frontend themes from the themes folder

frontend:
 themes: !include_dir_merge_named themes 

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

switch: 
 -platform wake_on_lan
  mac 00:00:00:00:00:00 (not an actual mac adress)
  name  PC
  wake_on_lan

Please format your code

There are several things wrong with your posted code.

# Loads default set of integrations. Do not remove.

default_config:

# Load frontend themes from the themes folder

frontend:
 themes: !include_dir_merge_named themes 

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

switch: 
 -platform wake_on_lan
  mac 00:00:00:00:00:00 (not an actual mac adress)
  name  PC
  wake_on_lan

Should look more like this:

# Loads default set of integrations. Do not remove.

default_config:

# Load frontend themes from the themes folder

frontend:
 themes: !include_dir_merge_named themes 

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

switch: 
  - platform: wake_on_lan
    mac: "00:00:00:00:00:00"
    name:  "PC"

Formatting matters, a lot. Start there and see where it takes you. Perhaps you just hand-typed this into the forum and didn’t add the proper indents, colons and quotes, but I’m just going off of what you posted.

the problem has already been resolved