Unable to Turn on LG Tv


I try using this code to turn on my LG uq8050 tv but i cant turn on. But able ti turn off. Also i connect this to my home assistant. But unable to use google nest hub 2 to co trol it. Please help me with this thanks.

Turn on use a “magic packet” sent over the network, but the TV is only able to receive it on the LAN connection.
I can’t see your connection type in your post though, so it was just a guess to a cause. :slight_smile:

Thank yòu for ur reply @WallyR

Currently i using wifi in my tv. So shud i use lan wire then i can use is it.

Is there anyway to turn on if only my wifi is connected.

this works also on Wifi, for me it does,
but you need add an automation like this

- alias: Turn On Living Room TV with WakeOnLan
  trigger:
  - platform: webostv.turn_on
    entity_id: media_player.living_room_tv
  action:
  - service: wake_on_lan.send_magic_packet
    data:
      mac: <tv amc address>
  id: <automation id>

check the docs

edit:
and if you have it working, check this one

Thank you @bkbartk. I will try this method later. But may i ask what is automation id here. Kinda new to HA. Thanks again.

I think you don’t need the id,
it’s an autogenerated value by HA
but it’s in my automation. that’s why I copied it.
The example doesn’t have it.

using wired myself, so it does not apply to me, but I remember vaguely there was something with a power-save/deep-sleep setting involved in using WiFi with WakeOnLAN :thinking:

This on code insode configuration file or jus automation will do?
@bkbartk