Sonos play_media update to support line-in / tv

Could you please update the sonos play_media function to support line-in and tv input selections either using a media_id or media_type parameter

Something like:

def play_media(self, media_type, media_id):
“”“Send the play_media command to the media player.”""
if (media_type == ‘line-in’) :
elif (media_type == ‘tv’) :

Hi, I’m currently working on a couple of feature extensions for Sonos:
and adding what you suggest should not be too hard picking up from there. I have a Playbar/TV but no Line-IN, not sure I could test it. Also, can’t promise I’ll find the time to work on that, but I’ll be happy to help out if something not clear

I changed it on my local last night and seemed to work before asking for this request. I need to run another test or two. I have two connect amps but not the playbar (yet)

No time yet to dig into the matter, in the meanwhile the two PR have been merged (v0.20.1)

I tested and the line in function works. I wrote a script to turn on my directv receiver, change channel set the sonos input and volume level. The tv turns on automatically using hdmi cec. Had to write my own directv media player component.

I have a sonos 5 and until recently the line input worked fine.

Recent updates to HA seem to have changed the way the sonos 5 and my ikea symphonisk work.

I used to be able to select line input on the sonos 5 and play that sound through the ikea speaker.

I seem to have lost that ability. What should I do?