Plex status and use for stopping

New to doing ha and all it involves I’m failing to find anything about if you can read the specifics of Plex shows and do something with them.

For example Plex is playing X show to user 2.

When button (app or in widget) is pressed the show will stop at end (so a change from s01e03 to s01e04 or anything else ) and turn off TV (Or player)

The TV I have hopefully got the integration right but we will see as it’s an older Samsung 6400 which seems to be issue filled anyway. Because of this it’s the custom app not the official Plex app.

Is such a thing possible ?

You should be able to write an automation that triggers on media_player attribute changes. Watch for the media to change and trigger the action to turn off the TV. To make it only occur certain times, also check an input_boolean state condition check which would indicate the trigger is active. This is the switch you’d toggle to stop the current episode/movie. When your automation fires, also turn off this input_boolean.

Sorry for the delayed reply.

Found attribute changes. That makes it easier . It’s knowing the right words it seems.

Might have to try some writing and see what works and go from there.

I think I found something that might work ? For sensor at least.

I know this topic is from almost three years ago, but did you have success?

Could you share your automation?

Thanks!