kevjs1982
(Kevjs1982)
April 25, 2018, 5:57pm
1
I’m trying to get my 2017 LG TV to turn on from Home Assistant.
Firstly if I send a magic packet from the debug screen it works
If I create a switch, the switch works.
switch lgtv:
- platform: wake_on_lan
mac_address: "78:5D:XX:XX:XX:XX"
name: Kev's Bedroom LG TV
If I try and add the wake_on_lan.send_magic_packet stuff to the turn_on_action it doesn’t work
media_player:
- platform: webostv
host: 192.168.X.X
name: Kev's Bedroom LG TV
timeout: 5
filename: kevwebostv.conf
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
mac: "78:5D:XX:XX:XX:XX"
Neither does using the switch as suggested in some old forum topics
media_player:
- platform: webostv
host: 192.168.X.X
name: Kev's Bedroom LG TV
timeout: 5
filename: kevwebostv.conf
turn_on_action:
service: switch.turn_on
entity_id: switch.lgtv
Has this turn_on_action stuff change again and not documented, or am I missing something? https://www.home-assistant.io/components/media_player.webostv/
Landrash
(Landrash)
April 25, 2018, 6:21pm
2
Your data field is missing "
media_player:
- platform: webostv
host: 192.168.X.X
name: Kev's Bedroom LG TV
timeout: 5
filename: kevwebostv.conf
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
"mac": "78:5D:XX:XX:XX:XX"
1 Like
Hi there,
Check your indentation, it looks a little out and the mac address doesn't require quotation....
The only other thing that may cause issues is the device name since it has an apostrophe....
media_player:
- platform: webostv
host: 192.168.X.X
name: Kevs Bedroom LG TV
timeout: 5
filename: kevwebostv.conf
turn_on_action:
- service: wake_on_lan.send_magic_packet
data:
mac: 78:5D:XX:XX:XX:XX
kevjs1982
(Kevjs1982)
April 25, 2018, 6:40pm
4
Bingo, I’d tried the mac with and without the quotes and that never worked, but once the mac
was changed to "mac"
it works perfectly.
matisaul
(Matias Saul)
April 26, 2018, 6:30pm
5
It doesn’t working for me… It’s "mac":"34:45:XX:XX:XX:XX"
or "mac":34:45:XX:XX:XX:XX
?
kevjs1982
(Kevjs1982)
April 26, 2018, 6:34pm
6
media_player:
- platform: webostv
host: 192.168.N.N
name: Kev's Bedroom LG TV
timeout: 5
filename: kevwebostv.conf
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
"mac": "78:5D:XX:XX:XX:XX"
Worked for me
It might not just be an issue with quotes. Check your yaml spacing/indentation. If you can post What you have for your media player in your yaml file. Also check that have wake on lan service also running.
matisaul
(Matias Saul)
April 26, 2018, 6:47pm
9
My bad. It was an indentation problem…
Thanks to all !
1 Like