Expose media_player as sensor

Hi,

I’m trying to make an automation where the lights will go off when a specific device starts playing any content in Plex.

Is it possible to define a sensor with a specific Plex client that sets 0 for Unavailable state and 1 for every other state?

Sure, make a template binary sensor checking that the state is not unavailable.