LG TV WebOS can not turn on

Hello,
i try to control my LG TV with WebOS and did succesusfuy add to my HA. I can turn off, switch the channesl, contol volume, but i can not switch on.
I configure my TV to allow Mobile TV swictin on , but there is only “Alllow siwtch on by WiFi” , my TV is wire connected.

Here is my config

wake_on_lan:

# Example configuration.yaml entry
webostv:
  host: 192.168.1.12
  name: LG Спалня
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      mac: A8:23:FE:8A:21:90
      broadcast_address: 192.168.1.255
      broadcast_port: 9
      message: "Turn on action"
  customize:
    sources:
      - livetv
      - youtube
      - makotv
      - netflix

media_player:

notify:

and when i try to switch on have a error

extra keys not allowed @ data['message']
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 125, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1281, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1316, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 208, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 595, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 331, in async_turn_on
    await self._on_script.async_run()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 790, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 185, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 193, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 382, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['message']

extra keys not allowed @ data['message']

There’s your problem. Remove message: "Turn on action"

1 Like

Awsom !
it is work !
Thank you !!!

Can I have one more question.
I have two TV LG and one Samsung in my home.
How can I add them in configuration.yaml
i did try this way , but they mixed

 webostv:
  host: 192.168.1.12
  name: LG Parent Room
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      mac: A8:23:FE:8A:21:90
      broadcast_address: 192.168.1.255
      broadcast_port: 9
  customize:
    sources:
      - livetv
      - youtube
      - makotv
      - netflix

  host: 192.168.1.25
  name: LG Kids Room
  turn_on_action:
    service: wake_on_lan.send_magic_packet
data:
      mac: CC:2D:8C:90:7D:5E
      broadcast_address: 192.168.1.255
      broadcast_port: 9
  customize:
    sources:
      - livetv
      - youtube
      - makotv
      - netflix

media_player:
  - platform: onkyo
    host: 192.168.1.10
    name: Onkyo
    sources:
      pc: 'HTPC'

notify:

Try this:

 webostv:
  - host: 192.168.1.12
    name: LG Parent Room
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: A8:23:FE:8A:21:90
        broadcast_address: 192.168.1.255
        broadcast_port: 9
    customize:
      sources:
        - livetv
        - youtube
        - makotv
        - netflix
  - host: 192.168.1.25
    name: LG Kids Room
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: CC:2D:8C:90:7D:5E
        broadcast_address: 192.168.1.255
        broadcast_port: 9

The “-” is important when using the same integration with multiple devices. It helps Home Assistant work out that you’re trying to set up two things, as opposed to setting up one device with two host addresses, two names, two turn_on_actions etc.

1 Like

Agian - it is work !
i put “-” at the name as well and it is work now !
Thank you!

Hello

I saw your post here and was hoping mabye you could help me.

Im trying to turn on my TV with Wake On Lan, but just cant seem to make it work. I have setup the integration and turning off the TV works trough Node-Red, also notifications work, but the WOL doesent. Could you check my config for errors?

This is it. :wink:

Thank you so much.

webostv:
  - host: 10.0.0.130
    name: LG Stua
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: C8-08-E9-33-EF-8C
        broadcast_address: 10.0.0.255
        broadcast_port: 9
        message:
    customize:
      sources:
        - HDMI1
        - LiveTV
        - YouTube

I’d swap the - for : in the mac address, I’ve found the wake on lan service to be very picky about what you send it. Pretty sure you don’t need message either. I’m also using port 8989 in my config.

1 Like

Thank you, works perfectly :slight_smile: