custom_components/smartthinq_sensors/sensor.py
def state(self):
        """Return the state of the sensor."""
        if not self.available:
            return STATE_UNAVAILABLE
        if self._is_binary:
            return STATE_ON if self.is_on else STATE_OFF
        return self._def[ATTR_VALUE_FN](self)
Return the state of the sensor.
Return the state of the sensor.
Return the state of the sensor .
def state(self):
        if not self.available:
            return STATE_UNAVAILABLE
        if self._is_binary:
            return STATE_ON if self.is_on else STATE_OFF
        return self._def[ATTR_VALUE_FN](self)
def state ( self ) : if not self . available : return STATE_UNAVAILABLE if self . _is_binary : return STATE_ON if self . is_on else STATE_OFF return self . _def [ ATTR_VALUE_FN ] ( self )
Return the state of the sensor.
Return the state of the sensor .
"""Return the state of the sensor."""
self