I’m trying to use ESPHome on one of my ESP32s with a 4-channel relay in order to switch on/off the loudspeakers in my garden. Before I flashed ESPHome, I used a self made script which worked but was somewhat unreliable.
I defined 4 outputs, but as soon as I try to turn on the second output, ESPHome tells me that’s a duplicate key and won’t compile it.
This is how I tried it:
As you can see, the second “output.turn_on” already throws the error "Duplicate key: output.turn_on. What am I doing wrong or how can I achieve what I’m trying to do? This may be a dumb question, but I would really appreciate if someone could push me in the right direction.
Thanks a lot in advance