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?
Spaces at the beginning of the line are critical in yaml, and people trying to help you may want to copy your code so that they can try it out themselves, so please format it correctly when you are posting.
Use the preformatted text tool (</> in the edit post toolbar). If it is not immediately visible, it will be in the cogwheel menu.
[Code_format]
Alternatively you can use three backticks (the key is on the far left, 2nd row on en keyboards) on their own line above and below the code. That i…
WallyR
(Wally)
March 13, 2024, 7:01am
5
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
.....