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.