Hello all.
I have recently (two weeks ago) taken the plunge and upgraded from IKEA Tradfri to Home Assistant in order to be able to automate more of my home than just lighting. I’ve already integrated my tv and cinema amp and I’ve created a dashboard with a virtual remote control for my whole home cinema setup.
So far I’ve been able to achieve everything I wanted to by searching previous topics, etc, but the one final thing that has had me stuck for a few days now is controlling the input source of my Onkyo cinema amp with a click of a button card. Unfortunately the official Onkyo integration is not terribly sophisticated.
I have created a dropdown helper with the source options (BLURAY, SKY, etc) and have been able to get a button card to select the correct source in the dropdown helper, for example:
cards:
- show_name: true
show_icon: false
type: button
tap_action:
action: perform-action
target:
entity_id:
- input_select.onkyo_source_selector
perform_action: input_select.select_option
data:
option: BLURAY
hold_action:
action: none
name: BLURAY
and I’ve been able to create a script that can be run at the click of a button card that can select a specified input on the amp, for example:
action: media_player.select_source
metadata: {}
data:
source: BLURAY
target:
entity_id: media_player.tx_nr646
I even managed to create multiple separate scripts, one for each source/button card, but I cannot, for the life of me, figure out how to combine the steps into a single script so the appropriate source will be selected on the amp depending on which button I click.
Any assistance or pointers will be most gratefully received as I’m spending far too long on this late at night and my wife is beginning to suspect I’m up to no good!