@arsenal3008 he was referring to this post, and not the post above
it works for me like this:
alias: WebOS On
description: ""
trigger:
- platform: device
device_id: <device_id>
domain: webostv
type: webostv.turn_on
condition: []
action:
- service: wake_on_lan.send_magic_packet
data:
mac: <mac-address>
broadcast_address: <ip-address>
broadcast_port: 22
- service: media_player.select_source
data:
source: Media Station X
target:
device_id: <device_id>
entity_id: media_player.lg_webos_smart_tv
i have this issue on 1/3 TVs. it will randomly not turn on or will turn on very delayed. the other 2 work without issue always. iāll see if adding the ip fixes it.
thanks for the tip!
EDIT: it didnāt fix it. i restarted HA completely and now the device in question responds to WoL instantly.
Hello!
Almost the same change was applied to Samsung TVs on the newest beta 2023.4+, so here is a similar blueprint:
Iāll check if I can create dynamic triggers and do a single blueprint for all TVs now that blueprint can take multiple filters.
Is this configuration suitable for LG?
For LG grab the one at the first post
do not use this anymore, thereās definitely an issue with the blueprint. i have 4 LG TVs, two of them are the same model. both on wifi, but one of them responds extremely inconsistently to WoL using this blueprint. with a simple automation it works 100% of the time. this drove me crazy for a week as i figured there couldnāt be anything wrong with this blueprint.
the original post says something about disabling/enabling the automation if there are issues. i could get it to work a few times by restarting HA, but it would come back very quickly. not sure why you linked to HA core webos issues, the issue is with this blueprint. webos WoL works great.
thereās a few unneeded things that could be causing an issue. looks like timeout + queued mode might get a little strange. something like this should be kept as simple as possible. butā¦ itās so easy to do yourself itās not worth figuring out.
this automation is so simple and works 100% of the time when does like this:
alias: webos wake on lan
description: ""
trigger:
- platform: device
device_id: ...
domain: webostv
type: webostv.turn_on
condition: []
action:
- service: wake_on_lan.send_magic_packet
data:
mac: aa:11:22:bb:44:55
mode: single
Hey there, itās a shame youāre having issues but Iāve been using my own blueprint for over a year on 3 different models without any issues, all my devices are connected through ethernet.
Itās weird that only one of the four TVs you have is inconsistent despite all of em using the same blueprint, if you want further help send some logs and blueprint configuration.
Back then there was an issue where the media player capabilities wasnāt checked correctly but that has been fixed for a long time now and likely are unrelated to your problem.
As long as it works weāre all happy
itās obviously been an issue before. you brought it up in the OP.
and this blueprint did work. then it stops responding for no reason and doesnāt work again until you restart HA completely. basic WoL works 100% of the time and i havenāt had an issue since removing this. just an FYI for anyone who might be experiencing the same they should also just do WoL themselves as itās very easy. this catch-all automation definitely has issues.
As long as you donāt send any evidence or logs I canāt help you or even know what issues youāre facing.
Letās wait and see if other members show up with the same problem and a more collaborative attitude.
The Blueprint for the LG TV works fine for over 1 year now. Itās my favorite automation. However, one thing has not yet been solved.
The source are clearly listed. I also can see and change them in the configuration of the integration once the TV is on. But, I want a specific source to start as default. This source is an app on the TV that works instead of a settop box.
This is what I programmed in Automation.yaml that I thought would do this. But it doesnāt work
Is it possible to select this source?
Where/what did I do wrong?
Apologies but I havenāt found the proper way the past the code in this message.
- id: ā1671053808257ā
alias: KPN as source
description: KPN
trigger:ā- platform: device
device_id: ca8c09588e2199253d1ae974d8c0d691
domain: media_player
entity_id: media_player.lg_webos_tv_617e
type: turned_on
condition: - condition: time
after: 00:00:05
action: - service: media_player.select_source
data:
source: KPN
target:
device_id: ca8c09588e2199253d1ae974d8c0d691
mode: single
- platform: device
Hello, the newer blueprint version has this built-in, so you only need to do something like this:
description: ""
use_blueprint:
path: cvroque/webostv_turn_on.yaml
input:
webostv: media_player.your_tv
on_action:
- service: media_player.select_source
data:
source: KPN
target:
entity_id: media_player.your_tv
webostv_mac: AA-BB-CC-DD-EE-99
The blueprint will wait until the TV is available and then change the source! Just make sure that the service to change source actually works by manually testing.
Thank you Carlos. Do I have to deinstall the current blueprint first?
Yes, unfortunately HA doesnāt have a way to upgrade yet.
Hopefully a last question:
This script is in Automation.yaml?
First post here. Thank you for the Blueprint. Iāve added the Plex Integration. Iāve added the LG WebOS integration. Iāve setup the Blueprint, pointing to that device and the MAC ID.
My 2022 LG OLED65C2PUA is recognized. Iāve added a media control card to the dashboard and I can turn the TV on and off through that card.
Once on, I can click ā¦ Source Plex. Thatās what Iām looking for, and itās there, and it works. I can turn off the TV through the card, but when I go back to turn on, it turns on to my regular HDMI input, my cable provider. When I go back to the three dots, itās set to Living Room TV again.
My question is this.
Is there a way through this automation or some other way to have the TV turn and and when I use this card, ALWAYS be on the Plex app source.
Thank you
If I build this automation via the UI it gives me the following YAML:
You can see that the time of 5 seconds is also included in the trigger and not as an extra condition.
description: ""
mode: single
trigger:
- platform: device
device_id: 14a866fc3d7397b331fce4d9fadd65ba
domain: media_player
entity_id: media_player.lg_webos_woonkamer
type: turned_on
for:
hours: 0
minutes: 0
seconds: 5
condition: []
action:
- service: media_player.select_source
data:
source: KPN
target:
entity_id: media_player.lg_webos_woonkamer
You also update this blueprint to include as āActions to run after TV is turned Onā.
If you want to create your own script/automation, you can also use a wait_for_trigger step to delay your script until your TV is really on and ready to receive input. This is my script to turn on my TV with Plex in this case.
Plex Script
alias: TV Woonkamer - Start Plex
mode: restart
icon: mdi:television-shimmer
sequence:
- if:
- condition: or
conditions:
- condition: device
device_id: 14a866fc3d7397b331fce4d9fadd65ba
domain: media_player
entity_id: media_player.lg_webos_woonkamer
type: is_off
then:
- service: media_player.turn_on
data: {}
target:
device_id: 14a866fc3d7397b331fce4d9fadd65ba
- wait_for_trigger:
- platform: device
device_id: 14a866fc3d7397b331fce4d9fadd65ba
domain: media_player
entity_id: media_player.lg_webos_woonkamer
type: turned_on
timeout:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- service: media_player.select_source
data:
source: Plex
target:
device_id: 14a866fc3d7397b331fce4d9fadd65ba
- service: media_player.volume_set
data:
volume_level: 0.2
target:
entity_id: media_player.lg_webos_woonkamer
else:
- service: media_player.select_source
data:
source: Plex
target:
entity_id: media_player.lg_webos_woonkamer
- service: media_player.volume_set
data:
volume_level: 0.2
target:
device_id: 14a866fc3d7397b331fce4d9fadd65ba
Guys,
When I turn the TV off with the media controller there is a delay of like 5-10 before the change appears on the app.
This does not work for my automation which is waiting for the off state of the TV to turn off.
Everything is in local network. Is there anything I can do to speed this up?
Turning on works instantly. However, when I turn off the TV it takes few seconds for the app to recognize that.
this is all included in vanilla HA. i would structure it like this.
make an automation as follows:
then make another automation that when the TV is TURNED ON (not requested) you switch to plex or whatever. this works flawless and requires no blueprints.
no, while webOS seems to accept requests quickly, it isnāt very fast at updating its state on any of my OLEDS from the past few years. you would work around this by creating a script with the first step being to turn off the TV, then calling whatever you are expecting to be called when the TV is turned off.
you can also try āwhen tv is requested to turn offā as the trigger.