dear all,
I want to integrate my LG TV into Home Assistant.
In configuration.yaml I added the following lines:
switch:
platform: wake_on_lan
name: LGTV
mac: 00-11-22-33-44-55
webostv:
host: 192.168.10.10
name: LG TV
turn_on_action:
service: switch.turn_on
entity_id: switch.LGTV
customize:
sources:
- HDMI 1
- HDMI 2
under sensors / template I entered following:
lgtv_source:
value_template: ‘{{ state_attr(“media_player.lg_tv”, “source”) }}’
friendly_name: ‘TV Source’
This makes me able to add a media control card and the entity “TV_Source” on the dashboard.
Now I want to create an automation depending if the TV is powered on or off.
How can I achieve this?
Thanks for helping me!