I have been beating my head against the wall trying to figure this out today. Goes without saying that Iām extremely new to this and appreciate any help
Coming from Change and highlight input source on AV Receiver - #3 by AdmiralRaccoon I have been trying to get a button to switch sources on my Lovelace dashboard. So far I have the following in configuration.yaml:
media_player:
- platform: yamaha_musiccast
host: 192.168.0.44
source_names:
HDMI1: "Chromecast"
AUDIO1: "TV Audio"
switch:
- platform: template
switches:
# TV Audio Source
tv_audio_source:
value_template: "{{ is_state_attr('media_player.yamaha_receiver', 'source', 'TV Audio') }}"
turn_on:
- service: media_player.select_source
data:
entity_id: media_player.yamaha_receiver
source: TV Audio
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.yamaha_receiver
source: TV Audio
I cannot for the life of me figure out how to call this on the front end via a button on my dashboard.
As a completely separate attempt to do the exact same thing I have also tried the following with no success.
Getting discouraged that something that seems so simple just does not seem to work no matter what I do. Is there something obvious that I am missing? Is there a better way to be doing this? Thanks all!