Please help me creating the power button for my LG TV.
I followed the steps on the integration page https://www.home-assistant.io/integrations/webostv/.
Immediately after integration I was able to use this card:
By default I can turn off the TV but not turn it on.
I tried several options found on the forum but something escapes me and I fail to integrate the stop function.
This is the code that I have now on my configuration file, not all is used as it can bee seen:
webostv:
host: !secret hostLG
name: Living room TV LG
#wake_on_lan
#media_player:
# - platform: webostv
# host: 192.168.2.204
# name: Living room TV
# mac: !secret LGwebOSTV_MAC
# filename: webostv.conf
# turn_on_action:
# service: wake_on_lan.send_magic_packet
# data:
# mac: !secret LGwebOSTV_MAC
Do I have to create a switch or something else to make it work?
Thanks for the info, now I have the on / off button visible all the time but I still can’t turn on the TV.
Do you have any idea if it might not work because my TV it is connected to WiFi?
It seems like this has changed in the past 2 years. This config recommended here by @danbutter gives an error now:
ERROR (MainThread) [homeassistant.components.webostv] The 'webostv' option has been removed, please remove it from your configuration
The docs suggest using an automation to turn on the TV as below. The wake_on_lan service works for me, but the power on button in the TV device card is still unavailable when the TV is off. What’s the current way to make this work?
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: aa:bb:cc:dd:ee:ff
I made the mistake of putting the yaml code in the configuration.yaml even though the directions clearly state to make an automation, newbie mistake. Here is a screenshot if you want to do this with the automation GUI
Sorry for this late response. In HACS you can find LG-WebOS-Remote-Control mentioned already by @aceindy. But for me the solution was to use an IR remote from Xiaomi ( Model ) this is the model if I remember well, I am also using for other TV BroadLink RM4 Mini which is working great.
I found this solution better because I was able to control also my soundbar.