Select input source STR-DN1080 Songpal integration

Hi! I have read every topic I can find about Songpal integration but I can´t figure out how this works. I’m new to this and I don’t fully understand the documentation for GitHub - rytilahti/python-songpal: Python library for interfacing with Sony's Songpal devices.
Probably it’s so easy so nobody explains how to do it. :slight_smile:

According to the documentation the Sony STR-DN1080 is compatible with the integration and I should be able to change input source with an automation. I have installed the integration and I can see the receiver in the entities list. I assume my problem is that I don’t manage to set up the automation correct.

My goal is to:
When press button A select input source BD/DVD
When press button B select input source VIDEO 1

Can someone please point me in the right direction or, even better, explain the steps from installing the integration to set up the automation rules. Am I missing something? Do I need to add something in for example the configuration.yaml?

Using HA on a Rasperry Pi
|Version| core-2021.11.5|
|Installation Type|Home Assistant OS|
|Development|false|
|Supervisor|true|
|Docker|true|
|User|root|
|Virtual Environment|false|
|Python Version|3.9.7|
|Operating System Family|Linux|
|Operating System Version|5.10.17-v7|
|CPU Architecture|armv7l|

Im looking to do the same but need to control zone 2 as this cant be done via Harmony remote or HA as far as i can see

I have found you can issue json requests and found this snippet

{
“method”:“setPlayContent”,
“id”:47,
“params”:[
{
“output”:“extOutput:zone?zone=2”,
“uri”:“extInput:sacd-cd”
}
],
“version”:“1.2”
}

But doesnt work via postman.

I have also found this page

GitHub - rytilahti/python-songpal: Python library for interfacing with Sony’s Songpal devices

which looks like it may allow me to chnage the zone 2 input but cant work out the command needed or how to call it from an automation

Regarding OP question, as per the Sony Songpal integration page you need to use the media player service to change sources. For instance, a script for your B button might look like this:

service: media_player.select_source
data:
  source: VIDEO 1
target:
  device_id: idontknowyourdeviceid

Regarding most recent comment in January, that GitHub page is also linked from the Sony Songpal integration page, but the relevant link is toward the end of this quote:

Services

In addition to the general media player services, the following services are provided:

Service songpal/set_sound_setting

For a list of available settings and their values use songpal sound command.

Unfortunately, as should be clear from that link, where the songpal sound command is in a separate section from the songpal zone command, zone controls aren’t sound settings. AFAICT, someone would need to write a “songpal.set_zone_setting” service or something along those lines in order for us to control Zone 2.