Want to be able to go back to what was playing on TV after switch to Camera on Chrome Cast

I have a Sony Bravia TV and with the latest release 2023.2 they have updated it to use the new media player and in particular “media_content_id”.

What I am wanting to do is set it up so that when I press a button it will do the following:

  1. take a note of what my current source is on my TV
  2. pause the media
  3. switch on the Chrome Cast on my TV and switch to the camera (this bit I can do)
  4. When I am finished viewing my camera, trigger it to return to my previous media
  5. Play the media again

I have ADB set up as well but looking at the State it doesn’t show any information on what the current state of the TV is.

Would love to hear peoples’ thoughts on this.

Cheers,
Girkers

1 Like

Did you ever get anywhere with this I want to do similar pause tv runs piece of media and then return to the source.

So pause Netflix run media then return to Netflix.

No when I got no help, I sort of gave up on the idea, plus with all the changes to the media with my TV (Sony) I have been struggling with that.

It is something I do want to get back to though.

Try service:scene.create and snapshot.

I have this working: TV is currently “off”. Automation turns “on” tv, plays media and when finished turns “off”.

What I don’t have working (yet) when tv is “on” - say YTTV - automation interrupts, plays media and when finished returns to YTTV. Now the tv just hangs on media_cast until I maually press “home” button on remote.

I also configured Universal Media Server. Scroll to bottom for Sony integration of cast and psk.