How to see the YAML for a Google Cast card?

My soundbar has a Google Cast card in HA that can turn it on and off. I’m hoping to add the on and off commands to an automation, but I can’t for the life of me figure out what the commands are. Is there a way to see the card’s YAML to find the names of the commands?

Do you have a screenshot or maybe even a link to the ‘Google Cast Card’?

Most cards have a ‘Show code editor’ link somewhere that takes you to the YAML code of the card, but without seeing the card and what it looks like in the GUI edit mode it’s hard to guess.

And then there is the ‘Raw configuration editor’ when you’re in edit mode for a dashboard (view).

The furthest I can drill down in the editor is here:

Editing the card with Code Editor just shows YAML to make a grid. It’s the top item, “Klipsch Flexus Core 300,” that I’m interested in.

I also took a screencap of the editor for my Overview configuration in case that’s helpful:

Use the ‘Show code editor’ in the bottom left corner to get to the YAML for the whole card or the {} to see the YAML for each individual one of your 3 pieces.

That’s where you’ll find the name of the cards you’re using as well EntityIDs which are shown for each device.

Okay. Clicking the {} was definitely a step I hadn’t taken. However, it gets me here:

It gives me the name of the entity, but not a way to see what commands it’s associated with. For example, what’s actually being sent when the power symbol on the card is clicked and the soundbar turns on/off. Is there a way I can look up the entity on my system and find more info?

You need to read up a little bit:
Media player - Home Assistant

Not all actions can be carried out by all media players.

Thankfully I’m far enough along to know that, at least! I looked in Developer Tools > States and converted the “supported features” to binary. It shows that the Media Player version of my soundbar doesn’t support on/off, but the Cast version does.

Am I correct that this means that there is a command that can be sent to the Cast version through an automation that will turn the bar on and off? I’m assuming so, since the power button on the card works, but I feel like I’m not much closer to finding it :joy:

… okay now I’m re-using Action in Developer Tools to send media_player.turn_on directly to the Cast media player and of course it’s working fine. No idea what I did wrong two days ago before I posted this thread.

I’m assuming that there’s no way to have the bar turn on with the Cast Media Player and not have it switch the input to Cast? Developer Tools > States doesn’t have a source_list listed for the soundbar’s media player. Am I correct that this means the option isn’t there? EDIT: Scratch that the binary for supported_features says it’s not supported.

Okay. I guess I’m back to trying to Wireshark the signals that the Klipsch app sends to turn the bar on and off. Thanks for your help with this!