I have a simple problem, though can’t seem to figure it out on my own. I have a physical button, connected to esp, configured through esphome showing in lovelace. I also have a SONOS speaker connected and configured and I can MANUALLY select between sources in lovelace. Everything good so far.
But here comes the catch: I cannot configure an automation to select between MULTIPLE sources based on button press, I can only do one source per one button (with media_player.select_source).
From programmers point of view i would love to have a variable being my index and that way selecting between array of sources like sources[number] and the number would increase or decrease based on button press. I can’t add another button since the remote is one made by yeelight, connected through ESP32’s BLE to esphome.
Anyway, I hope I made clear what my problem is. Just can’t think in HA way about the issue.