'Return true if switch is on.'

@property
def is_on(self):

    if (self.type == SWITCH_TYPE_CLEAN):
        if (self._clean_state == STATE_ON):
            return True
        return False
    elif (self.type == SWITCH_TYPE_SCHEDULE):
        if (self._schedule_state == STATE_ON):
            return True
        return False
