Can anyone help me create my first automation. My LG WebOSTV when it switches on always switches to HDMI1 but I want it to swithc to LiveTV. So I want to do an automation that detects when the tv goes on and switched the source attribute, something like:
automation:
- alias: "Switch TV Source At Power On"
trigger:
platform: state
entity_id: media_player.lounge_tv
from: 'off'
to: 'playing'
condition:
- condition: state
entity_id: media_player.lounge_tv
state: 'playing'
action:
I’m not sure how to set the source attribute to LiveTV??