Two onkyo receivers? Editing configuration.yaml

Hi, I have two Onkyo receivers and editing configuration.yaml is still a bit confusing for me…

I’ve tried copying in the following twice (ie as below), but I keep getting errors.

How can I get both to work? I’m sure it’s something really simple, but I haven’t wrapped my head around programming configuration.yaml as yet…

media_player:

  • platform: onkyo
    host: 192.168.0.135 — change to your IP
    name: onkyo
    sources:
    pc: “HTPC”

media_player:

  • platform: onkyo
    host: 192.168.0.136 — change to your IP
    name: onkyo
    sources:
    pc: "HTPC2 etc”

My first idea - the name: should not be the same. It is conflicting.

I hope you’re removing the “— change to your IP” bit?

When you have a line starting with - then it is an element in a list and you can then have more elements by starting lines with a -
In you case you have 2 configuration sections (media_player:) in your YAML with only one element in each.
Typical each only one of these will be used (if it is the first one or the latter one is hard to tell).

The correct way is to make on configuration section with 2 elements, ie…

media_player:
  - platform: onkyo
    name: receiver 1
    .....
  - platform: onkyo
    name: receiver 2
    .....