Ejemplo n.º 1
0
    def __init__(self, hass, config):
        """Initialize the cover."""
        KNXMultiAddressDevice.__init__(
            self,
            hass,
            config,
            ['updown', 'stop'],  # required
            optional=['setposition', 'getposition', 'getangle', 'setangle'])
        self._device_class = config.config.get(CONF_DEVICE_CLASS)
        self._invert_position = config.config.get(CONF_INVERT_POSITION)
        self._invert_angle = config.config.get(CONF_INVERT_ANGLE)
        self._hass = hass
        self._current_pos = None
        self._target_pos = None
        self._current_tilt = None
        self._target_tilt = None
        self._supported_features = SUPPORT_OPEN | SUPPORT_CLOSE | \
            SUPPORT_SET_POSITION | SUPPORT_STOP

        # Tilt is only supported, if there is a angle get and set address
        if CONF_SETANGLE_ADDRESS in config.config:
            _LOGGER.debug("%s: Tilt supported at addresses %s, %s", self.name,
                          config.config.get(CONF_SETANGLE_ADDRESS),
                          config.config.get(CONF_GETANGLE_ADDRESS))
            self._supported_features = self._supported_features | \
                SUPPORT_SET_TILT_POSITION
Ejemplo n.º 2
0
    def __init__(self, hass, config):
        """Initialize the thermostat based on the given configuration."""
        KNXMultiAddressDevice.__init__(self, hass, config,
                                       ['temperature', 'setpoint'], ['mode'])

        self._unit_of_measurement = TEMP_CELSIUS  # KNX always used celsius
        self._away = False  # not yet supported
        self._is_fan_on = False  # not yet supported
Ejemplo n.º 3
0
    def __init__(self, hass, config):
        """Initialize the thermostat based on the given configuration."""
        KNXMultiAddressDevice.__init__(
            self, hass, config, ['temperature', 'setpoint'], ['mode'])

        self._unit_of_measurement = TEMP_CELSIUS  # KNX always used celsius
        self._away = False  # not yet supported
        self._is_fan_on = False  # not yet supported
Ejemplo n.º 4
0
    def __init__(self, hass, config):
        """Initialize the cover."""
        KNXMultiAddressDevice.__init__(
            self, hass, config,
            [],  # required
            optional=['state', 'brightness', 'brightness_state']
        )
        self._hass = hass
        self._supported_features = 0

        if CONF_BRIGHTNESS_ADDRESS in config.config:
            _LOGGER.debug("%s is dimmable", self.name)
            self._supported_features = self._supported_features | \
                SUPPORT_BRIGHTNESS
            self._brightness = None
Ejemplo n.º 5
0
    def __init__(self, hass, config):
        """Initialize the cover."""
        KNXMultiAddressDevice.__init__(
            self,
            hass,
            config,
            [],  # required
            optional=['state', 'brightness', 'brightness_state'])
        self._hass = hass
        self._supported_features = 0

        if CONF_BRIGHTNESS_ADDRESS in config.config:
            _LOGGER.debug("%s is dimmable", self.name)
            self._supported_features = self._supported_features | \
                SUPPORT_BRIGHTNESS
            self._brightness = None