How turn on Philips TV using WOL?

okay updated !

Google philips commands :wink:
You can check connection to your TV in offline mode- it should answer:

http://ip:1925/system

Maybe my post in this thread can give an alternate solution (more of a hack actually…)

Hey guys, just in case someone lands on this page later (like I did)…

I struggled a bit turning on my Phillips Android TV with the wake on LAN. The TV does indeed go into a deep sleep after about 10 minutes. I randomly found out though, that in that case you can use Wake On Lan to wake it up, after which you can turn it on again using the remote integration. This script uses the android remote integration. Make sure you add your TV’s mac address.

conditional_wol_and_turn_on:
  sequence:
    - choose:
        - conditions:
            - condition: state
              entity_id: "remote.tv_current"
              state: "unavailable"
          sequence:
            - service: wake_on_lan.send_magic_packet
              data:
                mac: MAC_ADDRESS_HERE
            - repeat:
                sequence:
                  - delay:
                      seconds: 1
                  - condition: template
                    value_template: "{{ is_state('remote.tv_current', 'off') }}"
                until: "{{ repeat.index == 30 or is_state('remote.tv_current', 'off') }}"
    - service: remote.turn_on
      target:
        entity_id: remote.tv_current

For my TV it takes about 5 seconds to wake up after the WOL packet is send. I tried using a wait_for_trigger, but for me the state going from “unavailable” back to “off” didn’t trigger that event. This uses a loop that checks it every second for 30 seconds.

Hope this helps someone!

where have you put the code? in a script in the script section?
sorry , just need a little help , my tv works perfect with the integration but after 2-3 min it is turned off , cannot be turned on again by the integration

I would also like to join in here. It sounds like this is my solution, but I still don’t understand how to use this script as I’m relatively new to Home Assistant.
I have already tried to save the first script from this thread under Automations, but I get the error message: Message malformed: extra keys not allowed @ data[’automation‘] so I assume that something has changed in the syntax and it is no longer compatible with the latest Home Assistant version. How should I configure it instead? Or is there another solution to the problem in the meantime?

Thank you very much!