Using automation to change receiver source - Solved

I’m trying to get my receiver to turn on and change to a source when I start playing Sonos. I’ve got it to the point of turning on but can’t figure out how to get it to change to the correct source. Below is what I have for my automation.

#Onkyo on for Sonos

  • alias: ‘Onkyo on for music’
    trigger:
    platform: state
    entity_id: media_player.bathroom
    to: ‘playing’
    action:
    • service: homeassistant.turn_on
      entity_id: media_player.onkyo
    • service: media_player.select_source
      entity_id: video6

That service call for the select_source doesn’t look right. That doesn’t look like a proper entity_id.

Open the states dev tool (icons at bottom of left column) and see if you can figure out the correct entity_id. The services dev tool will help you figure out the correct data to pass to the service (and also the name of the service).

Found the answer here: