Turning on LG webOS Can't find platform webostv.turn_on for automation

In dozens of posts online I’m seeing this below as part of the process for turning on a webOS LG tv using an automation, along with the Wake on LAN: Send magic packet. Where do you get this Platform from?

    trigger:
      - platform: webostv.turn_on
        entity_id: media_player.lg_webos_smart_t

Thank you fried cheese. Didn’t know I needed all that in configuration.yaml, I thought it was part of an automation. I must admit, as a new user I don’t understand when and why things go into configuration.yaml.
Anyway, when I put it in, I get an error, Duplicate key, the word “Automation”. Can you take a look:

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

homeassistant:
  !include customize.yaml

ffmpeg:

# To have LG TV turn on
wake_on_lan: 

automation:
  - alias: "Turn On Living Room TV with WakeOnLan"
    trigger:
      - platform: webostv.turn_on
        entity_id: media_player.lg_webos_smart_tv
    action:
      - service: wake_on_lan.send_magic_packet
        data:
          mac: HI:DD:EN:MA:C#:ID

Since you have automation declared already with automation: !include automations.yaml you can’t add it again.

So, take the stuff out of configuration.yaml that you just added and put it into the existing automations.yaml file.

Sorry, I’m still confused. The automations.yaml file has all my automations in it. Where do I put these lines? Will it show up when I go into Settings → Automations?

automation:
  - alias: "Turn On Living Room TV with WakeOnLan"
    trigger:
      - platform: webostv.turn_on
        entity_id: media_player.lg_webos_smart_tv
    action:
      - service: wake_on_lan.send_magic_packet
        data:
          mac: HI:DD:EN:MA:C#:ID

And do I keep the

wake_on_lan:

in the configuration.yaml file?

Yes, the wake_on_lan line stays.

If you aren’t comfortable with manually adding the automation, you can do this through the UI.

  1. Go to automations and add a new one.
  2. Click the kebab (three vertical dots) in the upper right-hand corner.
  3. Select the option for “Edit in YAML”.
  4. Paste this in:
alias: Turn On Living Room TV with WakeOnLan
trigger:
  - platform: webostv.turn_on
    entity_id: media_player.lg_webos_smart_tv
action:
  - service: wake_on_lan.send_magic_packet
    data:
      mac: HI:DD:EN:MA:C#:ID

Update the MAC of course and save.

This

HI:DD:EN:MA:C#:ID

or this:

HI-DD-EN-MA-C#-ID

When I put it in with colons, it won’t let me put in the last two digits, it turns red. When I do it with dashes, it allows it.

Weird…it should be colonized:

de:ad:be:ef:12:34

image

Very strange. Even in this Blueprint which sends the magic packet every time the TV is turned on, they use dashes:

Even here: