Absolute beginner, as ever diving in at the deep end! I am trying to make a remote control for my LGTV. The TV runs webOS version 7.5.7-24.
I have got the buttons etc to work surprisingly well and easily then i turned my attention to PowerOn and PowerOff. I installed Wake On Lan and matched it to the TV MAC address. Having checked the tv quick start settings are disabled, the button works both on (wake Up) and off BUT only when the tv is set to its Netflix source. Any other source, and there is no highlighted button on the remote, and nothing works, the second i switch to Netflix, the illuminated button comes on and hey presto it works, shuts the TV down, and press once more and it starts up.
The code i am using is:
type: picture-elements
elements:
- type: conditional
title: PowerOn
conditions:
- condition: state
entity: media_player.lg_webos_tv_uq80006lb
state: "off"
elements:
- type: image
style:
left: 35%
top: 94.5%
width: 14%
entity: media_player.lg_webos_tv_uq80006lb
title: PowerOn
tap_action:
action: perform-action
perform_action: wake_on_lan.send_magic_packet
target: {}
data:
broadcast_port: 9
mac: AC:5A:F0:F7:7A:A7
image: local/TVRemote/power.png
- type: conditional
title: PowerOff
conditions:
- condition: state
entity: media_player.lg_webos_tv_uq80006lb
state: "on"
elements:
- type: image
style:
left: 35%
top: 94.5%
width: 14%
entity: media_player.lg_webos_tv_uq80006lb
title: PowerOff
tap_action:
action: toggle
image: local/TVRemote/powerON.png
state_image:
"on": local/TVRemote/powerON.png
image: local/TVRemote/Base.png
If anyone has any pointers i would be most grateful… remember i am a newbie… be gentle!