'Return the state of the device.'

@property
def state(self):

    if ((self.player_state == 'offline') or (self.player_state is None)):
        return 'offline'
    if (self.player_state == 'error'):
        return 'error'
    if (self.player_state == 'stopped'):
        return STATE_IDLE
    if (self.player_state == 'paused'):
        return STATE_PAUSED
    return STATE_PLAYING
