@property
    def state(self):
        if self.session:
            state = self.session.player.state
            if state == 'playing':
                return STATE_PLAYING
            elif state == 'paused':
                return STATE_PAUSED
        # This is nasty. Need to find a way to determine alive
        elif self.device:
            return STATE_IDLE
        else:
            return STATE_OFF

        return STATE_UNKNOWN
Return the state of the device.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/plex.py/PlexClient.state