How to use the xknx.dpt.HVACOperationMode function in xknx

To help you get started, we’ve selected a few xknx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github XKNX / xknx / xknx / remote_value / remote_value_climate_mode.py View on Github external
def supported_operation_modes():
        """Return a list of the configured operation mode."""
        return [HVACOperationMode.HEAT,
                HVACOperationMode.COOL]
github XKNX / xknx / xknx / devices / climate_mode.py View on Github external
def guess_operation_modes(self):
        """Guess operation modes from group addresses."""
        # All operation modes supported
        if self.group_address_operation_mode is not None:
            return [HVACOperationMode.AUTO, HVACOperationMode.COMFORT,
                    HVACOperationMode.STANDBY, HVACOperationMode.NIGHT,
                    HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_status is not None:
            return [HVACOperationMode.COMFORT, HVACOperationMode.STANDBY,
                    HVACOperationMode.NIGHT, HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_mode is not None:
            return [HVACOperationMode.STANDBY, HVACOperationMode.AUTO, HVACOperationMode.HEAT,
                    HVACOperationMode.COOL, HVACOperationMode.FAN_ONLY, HVACOperationMode.DRY]

        # Operation modes only supported partially
        operation_modes = []
        if self.group_address_operation_mode_comfort:
            operation_modes.append(HVACOperationMode.COMFORT)
        operation_modes.append(HVACOperationMode.STANDBY)
        if self.group_address_operation_mode_night:
            operation_modes.append(HVACOperationMode.NIGHT)
github XKNX / xknx / xknx / remote_value / remote_value_climate_mode.py View on Github external
def supported_operation_modes():
        """Return a list of the configured operation mode."""
        return [HVACOperationMode.COMFORT,
                HVACOperationMode.FROST_PROTECTION,
                HVACOperationMode.NIGHT,
                HVACOperationMode.STANDBY]
github XKNX / xknx / xknx / devices / climate_mode.py View on Github external
def guess_operation_modes(self):
        """Guess operation modes from group addresses."""
        # All operation modes supported
        if self.group_address_operation_mode is not None:
            return [HVACOperationMode.AUTO, HVACOperationMode.COMFORT,
                    HVACOperationMode.STANDBY, HVACOperationMode.NIGHT,
                    HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_status is not None:
            return [HVACOperationMode.COMFORT, HVACOperationMode.STANDBY,
                    HVACOperationMode.NIGHT, HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_mode is not None:
            return [HVACOperationMode.STANDBY, HVACOperationMode.AUTO, HVACOperationMode.HEAT,
                    HVACOperationMode.COOL, HVACOperationMode.FAN_ONLY, HVACOperationMode.DRY]

        # Operation modes only supported partially
        operation_modes = []
        if self.group_address_operation_mode_comfort:
            operation_modes.append(HVACOperationMode.COMFORT)
        operation_modes.append(HVACOperationMode.STANDBY)
        if self.group_address_operation_mode_night:
            operation_modes.append(HVACOperationMode.NIGHT)
        if self.group_address_operation_mode_protection:
            operation_modes.append(HVACOperationMode.FROST_PROTECTION)
        return operation_modes
github XKNX / xknx / xknx / devices / climate_mode.py View on Github external
if self.group_address_operation_mode is not None:
            return [HVACOperationMode.AUTO, HVACOperationMode.COMFORT,
                    HVACOperationMode.STANDBY, HVACOperationMode.NIGHT,
                    HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_status is not None:
            return [HVACOperationMode.COMFORT, HVACOperationMode.STANDBY,
                    HVACOperationMode.NIGHT, HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_mode is not None:
            return [HVACOperationMode.STANDBY, HVACOperationMode.AUTO, HVACOperationMode.HEAT,
                    HVACOperationMode.COOL, HVACOperationMode.FAN_ONLY, HVACOperationMode.DRY]

        # Operation modes only supported partially
        operation_modes = []
        if self.group_address_operation_mode_comfort:
            operation_modes.append(HVACOperationMode.COMFORT)
        operation_modes.append(HVACOperationMode.STANDBY)
        if self.group_address_operation_mode_night:
            operation_modes.append(HVACOperationMode.NIGHT)
        if self.group_address_operation_mode_protection:
            operation_modes.append(HVACOperationMode.FROST_PROTECTION)
        return operation_modes
github XKNX / xknx / xknx / remote_value / remote_value_climate_mode.py View on Github external
def supported_operation_modes():
        """Return a list of the configured operation mode."""
        return [HVACOperationMode.HEAT,
                HVACOperationMode.COOL]
github XKNX / xknx / xknx / devices / climate_mode.py View on Github external
def guess_operation_modes(self):
        """Guess operation modes from group addresses."""
        # All operation modes supported
        if self.group_address_operation_mode is not None:
            return [HVACOperationMode.AUTO, HVACOperationMode.COMFORT,
                    HVACOperationMode.STANDBY, HVACOperationMode.NIGHT,
                    HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_status is not None:
            return [HVACOperationMode.COMFORT, HVACOperationMode.STANDBY,
                    HVACOperationMode.NIGHT, HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_mode is not None:
            return [HVACOperationMode.STANDBY, HVACOperationMode.AUTO, HVACOperationMode.HEAT,
                    HVACOperationMode.COOL, HVACOperationMode.FAN_ONLY, HVACOperationMode.DRY]

        # Operation modes only supported partially
        operation_modes = []
        if self.group_address_operation_mode_comfort:
            operation_modes.append(HVACOperationMode.COMFORT)
        operation_modes.append(HVACOperationMode.STANDBY)
        if self.group_address_operation_mode_night:
            operation_modes.append(HVACOperationMode.NIGHT)
        if self.group_address_operation_mode_protection:
github XKNX / xknx / xknx / devices / climate_mode.py View on Github external
def guess_operation_modes(self):
        """Guess operation modes from group addresses."""
        # All operation modes supported
        if self.group_address_operation_mode is not None:
            return [HVACOperationMode.AUTO, HVACOperationMode.COMFORT,
                    HVACOperationMode.STANDBY, HVACOperationMode.NIGHT,
                    HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_status is not None:
            return [HVACOperationMode.COMFORT, HVACOperationMode.STANDBY,
                    HVACOperationMode.NIGHT, HVACOperationMode.FROST_PROTECTION]
        if self.group_address_controller_mode is not None:
            return [HVACOperationMode.STANDBY, HVACOperationMode.AUTO, HVACOperationMode.HEAT,
                    HVACOperationMode.COOL, HVACOperationMode.FAN_ONLY, HVACOperationMode.DRY]

        # Operation modes only supported partially
        operation_modes = []
        if self.group_address_operation_mode_comfort:
            operation_modes.append(HVACOperationMode.COMFORT)
        operation_modes.append(HVACOperationMode.STANDBY)
        if self.group_address_operation_mode_night:
            operation_modes.append(HVACOperationMode.NIGHT)
        if self.group_address_operation_mode_protection:
            operation_modes.append(HVACOperationMode.FROST_PROTECTION)
        return operation_modes
github XKNX / xknx / xknx / remote_value / remote_value_climate_mode.py View on Github external
def __init__(self,
                 xknx,
                 group_address=None,
                 group_address_state=None,
                 sync_state=True,
                 device_name=None,
                 feature_name="Climate Mode Binary",
                 after_update_cb=None,
                 operation_mode=None):
        """Initialize remote value of KNX DPT 1 representing a climate operation mode."""
        # pylint: disable=too-many-arguments
        if not isinstance(operation_mode, HVACOperationMode):
            raise ConversionError("Invalid operation mode type",
                                  operation_mode=operation_mode, device_name=device_name, feature_name=feature_name)
        if operation_mode not in self.supported_operation_modes():
            raise ConversionError("Operation mode not supported for binary mode object",
                                  operation_mode=operation_mode, device_name=device_name, feature_name=feature_name)
        self.operation_mode = operation_mode
        super().__init__(xknx,
                         group_address=group_address,
                         group_address_state=group_address_state,
                         sync_state=True,
                         device_name=device_name,
                         feature_name=feature_name,
                         after_update_cb=after_update_cb)