I would like to create a card to change input on my Yamaha AV Receiver, and it should look something like this:
So I guess changing the sources is not the problem, I would do that with a service call. But I want the source also to stay highlighted when selected, like this example:
Is this possible and how would I do that?
Thanks for any suggestions and/or code exapmples!
It doesn’t matter what the turn_off is because you’ll never be ‘turning off’ your source, only turning on. So I just made my turn_off service identical to turn on.
This my current Harmony, Yamaha, Source setup. The 2nd to last row is my sources on the reciever. The last row is my surround sound system modes.
Not sure if I’m allowed to bump old topics, but I didn’t want to remake a thread just to ask the same question. In your example your input sources are highlighted as the OP asked, but when I try to implement it, both my sources show in the “off” state.
Then when you click the switch for an input it should change the source and it’ll show as on. If that’s not happening, you have the wrong source names.
Copy the source from the source attribute and use that in the template. Try it in the template editor. Also try the version you have in the template editor.
Before I read your reply I went into my entities and manually toggled then on and off. Now the cards are actually showing the source state properly. I have no idea why that’s the case, I’ll just assume user error.
Tried a couple browsers, incognito mode, phone, tablet, all the same result. It’s wild. Damn gremlins.
EDIT: In case anyone needs some closure, my issue was that in my configuration.yaml I renamed a couple of my receiver inputs, and completely forgot about that. @petro your comment about the media source attribute being the proper source was bang-on, I just completely misunderstood what you asked and was looking at something else entirely.