LGWebOS - Turn On Action Not Working

I’m trying to get my 2017 LG TV to turn on from Home Assistant.

Firstly if I send a magic packet from the debug screen it works

Screenshot_6

If I create a switch, the switch works.

switch lgtv:
- platform: wake_on_lan
  mac_address: "78:5D:XX:XX:XX:XX"
  name: Kev's Bedroom LG TV

If I try and add the wake_on_lan.send_magic_packet stuff to the turn_on_action it doesn’t work

media_player:
- platform: webostv
  host: 192.168.X.X
  name: Kev's Bedroom LG TV
  timeout: 5
  filename: kevwebostv.conf
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      mac: "78:5D:XX:XX:XX:XX"

Neither does using the switch as suggested in some old forum topics

media_player:
- platform: webostv
  host: 192.168.X.X
  name: Kev's Bedroom LG TV
  timeout: 5
  filename: kevwebostv.conf
  turn_on_action:
    service: switch.turn_on
    entity_id: switch.lgtv

Has this turn_on_action stuff change again and not documented, or am I missing something? https://www.home-assistant.io/components/media_player.webostv/

Your data field is missing "

media_player:
- platform: webostv
  host: 192.168.X.X
  name: Kev's Bedroom LG TV
  timeout: 5
  filename: kevwebostv.conf
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      "mac": "78:5D:XX:XX:XX:XX"

1 Like
Hi there,
Check your indentation, it looks a little out and the mac address doesn't require quotation....
The only other thing that may cause issues is the device name since it has an apostrophe....
media_player:
  - platform: webostv
    host: 192.168.X.X
    name: Kevs Bedroom LG TV
    timeout: 5
    filename: kevwebostv.conf
    turn_on_action:
      - service: wake_on_lan.send_magic_packet
        data:
           mac: 78:5D:XX:XX:XX:XX

Bingo, I’d tried the mac with and without the quotes and that never worked, but once the mac was changed to "mac" it works perfectly.

It doesn’t working for me… It’s "mac":"34:45:XX:XX:XX:XX" or "mac":34:45:XX:XX:XX:XX ?

media_player:
- platform: webostv
  host: 192.168.N.N
  name: Kev's Bedroom LG TV
  timeout: 5
  filename: kevwebostv.conf
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      "mac": "78:5D:XX:XX:XX:XX"

Worked for me

It might not just be an issue with quotes. Check your yaml spacing/indentation. If you can post What you have for your media player in your yaml file. Also check that have wake on lan service also running.

Check this post. LG WebOS TV wont turn on anymore?

My bad. It was an indentation problem…

Thanks to all !

1 Like