'Return the state of the device.'

@property
def state(self):

    if (self.current_app is None):
        return STATE_UNKNOWN
    if ((self.current_app.name == 'Power    Saver') or self.current_app.is_screensaver):
        return STATE_IDLE
    elif (self.current_app.name == 'Roku'):
        return STATE_HOME
    elif (self.current_app.name is not None):
        return STATE_PLAYING
    return STATE_UNKNOWN
