'Return the state of the sensor.'

@property
def state(self):

    if (not self.available):
        return None
    elif (self._type == SENSOR_TYPE_TEMP):
        return self._value_as_temperature
    elif (self._type == SENSOR_TYPE_HUMIDITY):
        return self._value_as_humidity
    elif (self._type == SENSOR_TYPE_LUMINANCE):
        return self._value_as_luminance
    return self._value
