Media Player State w/ Conditional Card

So I’ve got my older onkyo HT-RC550 receiver working with HA, sort of. Currently I’m only really looking to use it as a source for MP3 player/FM radio, using ZONE2 of the receiver. It’s just going to dump into a whole home amplifier with volume controls in each room.

I’ve setup a card in lovelace using “input_select” drop down to select from all our favorite radio stations, and using some shell-commands I can get the system to jump to the correct station. the basic media player card seems to work well for turning the receiver on/off and even changes color to indicate if the sysem is on or off (specifically “media_player.ht-rc550_zone_2”). Using a horizontal stack with some buttons triggering scripts to change the input modes via shell command.

How do I get access to that power on/off state? (and ideally the selected source as well) I would like to use a conditional card to only show the input_select card if the receiver is powered on and in the FM mode.

I tried to look into if I could use shell commands to check the status (send “onkyo --host 192.168.0.24 ZPWQSTN” for the power state and it returns “HT-RC550 ZPW00” or “HT-RC550 ZPW01” depending on on/off state) but I can’t seem to get a clear answer if there’s a way. I see something about creating a sensor but I’m unsure how to do that for command line responses.

Ideally, I’d be able to power on the amp, check the current source, check the current radio station, and then show/hide the card, and if shown, select the current item in the dropdown menu.

Any help is appreciated!

Well… typical me fashion i figured out the power state thing 2minutes after posting (which i messed with for over an hour first)…
I had the wrong media_player entity selected in the conditional card. wasn’t using the “_zone_2” one. whoops. Now it works with state “on” or “off”

But the rest of the question about the command line responses is still valid - how do I process things like that? I still don’t see a way to check what the current source is, or what the station is.