Link Search Menu Expand Document

HVAC/Climate controls

Overview

Climate are representations of KNX HVAC/Climate controls.

Example

climate_setpoint_shift = Climate(
    xknx,
    'TestClimateSPS',
    group_address_temperature='1/2/2',
    group_address_target_temperature_state='1/2/5',
    group_address_setpoint_shift='1/2/3',
    group_address_setpoint_shift_state='1/2/4'
)

climate_target_temp = Climate(
    xknx,
    'TestClimateTT',
    group_address_temperature='2/2/2',
    group_address_target_temperature='2/2/3',
    group_address_target_temperature_state='2/2/4'
)

Configuration via xknx.yaml

Climate devices are usually configured via xknx.yaml:

groups:
  climate:
    Children.Climate:
      {
        group_address_temperature: "1/7/2",
        group_address_setpoint_shift: "1/7/3",
        group_address_target_temperature_state: "1/7/4",
      }
    Office.Climate:
      {
        group_address_temperature: "1/7/5",
        group_address_operation_mode: "1/7/6",
      }
    Attic.Climate:
      {
        group_address_temperature: "1/7/7",
        group_address_operation_mode_protection: "1/7/8",
        group_address_operation_mode_night: "1/7/9",
        group_address_operation_mode_comfort: "1/7/10",
      }

Interface

  • group_address_temperature KNX address of current room temperature.
  • group_address_target_temperature KNX address for setting the target temperature if setpoint shift is not supported.
  • group_address_target_temperature_state KNX address for reading the target temperature from the KNX bus. Used in for setpoint_shift calculations as base temperature.
  • group_address_setpoint_shift KNX address to set setpoint_shift (base temperature deviation).
  • group_address_setpoint_shift_state KNX address to read current setpoint_shift.
  • setpoint_shift_max Maximum value for setpoint_shift.
  • setpoint_shift_min Minimum value for setpoint_shift.
  • temperature_step Set the multiplier for setpoint_shift (DPT 6) calculations and the step size for HA UI-elements.
  • group_address_on_off KNX address for turning climate device on or off.
  • group_address_on_off_state KNX address for reading the on/off state.
  • on_off_invert Invert on/off.
  • max_temp Maximum value for target temperature.
  • min_temp Minimum value for target temperature.
  • mode ClimateMode instance for this climate device

  • group_address_operation_mode KNX address for operation mode. DPT 20.102
  • group_address_operation_mode_state KNX address for operation mode status. DPT 20.102
  • group_address_operation_mode_protection KNX address for switching on/off frost/heat protection mode. DPT 1
  • group_address_operation_mode_night KNX address for switching on/off night nmode. DPT 1
  • group_address_operation_mode_comfort KNX address for switching on/off comfort mode. DPT 1
  • group_address_operation_mode_standby KNX address for switching on/off standby mode. DPT 1
  • group_address_controller_status KNX address for controller status.
  • group_address_controller_status_state KNX address for controller status state.
  • group_address_controller_mode KNX address for controller mode. DPT 20.105
  • group_address_controller_mode_state KNX address for controller mode status. DPT 20.105
  • group_address_heat_cool KNX address for switching heating / cooling mode. DPT 1
  • group_address_heat_cool_state KNX address for reading heating / cooling mode. DPT 1
  • operation_modes Overrides the supported operation modes.

Note: group_address_operation_mode_protection / group_address_operation_mode_night / group_address_operation_mode_comfort / group_address_operation_mode_standby are not necessary if group_address_operation_mode was specified. When one of these is set True, the others will be set False. When one of these is set “Standby”, “Comfort”, “Frost_Protection” and “Night” will be set as supported. If group_address_operation_mode_standby is omitted, “Standby” is set when the other 3 are set to False. If only a subset of operation modes shall be used a list of supported modes may be passed to operation_modes.

climate_mode = ClimateMode(xknx,
                 'TestClimateMode',
                 group_address_operation_mode='',
                 group_address_operation_mode_state='',
                 group_address_operation_mode_protection=None,
                 group_address_operation_mode_night=None,
                 group_address_operation_mode_comfort=None,
                 group_address_controller_status=None,
                 group_address_controller_status_state=None,
                 group_address_controller_mode=None,
                 group_address_controller_mode_state=None,
                 operation_modes=None,
                 device_updated_cb=None)

climate = Climate(
        xknx,
        'TestClimate',
        group_address_temperature='',
        group_address_target_temperature='',
        group_address_target_temperature_state='',
        group_address_setpoint_shift='',
        group_address_setpoint_shift_state='',
        temperature_step=0.1,
        setpoint_shift_max=6,
        setpoint_shift_min=-6,
        group_address_on_off='',
        group_address_on_off_state='',
        on_off_invert=False,
        min_temp=18,
        max_temp=26,
        mode=climate_mode,
        device_updated_cb=None)

# Set target temperature to 23 degrees. Works with setpoint_shift too.
await climate.set_target_temperature(23)
# Set new setpoint shift value.
await climate.set_setpoint_shift(1)
# Reading climate device
await climate.sync()
print("Current temperature: ", climate.temperature)