HVAC/Climate controls
Overview
Climate are representations of KNX HVAC/Climate controls.
Interface
xknxis the XKNX object.nameis the name of the object.group_address_temperatureKNX address of current room temperature. DPT 9.001group_address_target_temperatureKNX address for setting the target temperature if setpoint shift is not supported. DPT 9.001group_address_target_temperature_stateKNX address for reading the target temperature from the KNX bus. Used in for setpoint_shift calculations as base temperature. DPT 9.001group_address_setpoint_shiftKNX address to set setpoint_shift (base temperature deviation). DPT 6.010 or DPT 9.002group_address_setpoint_shift_stateKNX address to read current setpoint_shift. DPT 6.010 or DPT 9.002group_address_fan_speedKNX address for the fan speed. DPT 5.001 / 5.010group_address_fan_speed_stateKNX address for reading fan speed. DPT 5.001 / 5.010group_address_swingKNX address for fan swing. Ifgroup_address_horizontal_swingis present this should refer to vertical swing DPT 1group_address_swing_stateKNX address for reading fan swing. Ifgroup_address_horizontal_swingis present this should refer to vertical swing DPT 1group_address_horizontal_swingKNX address for horizontal fan swing. DPT 1group_address_horizontal_swing_stateKNX address for reading horizontal fan swing. DPT 1setpoint_shift_modeSetpointShiftMode Enum for setpoint_shift payload encoding. WhenNoneit is inferred from first incoming payload. Default:Nonesetpoint_shift_maxMaximum value for setpoint_shift.setpoint_shift_minMinimum value for setpoint_shift.temperature_stepSet the multiplier for setpoint_shift calculations when DPT 6.010 is used.group_address_on_offKNX address for turning climate device on or off. DPT 1group_address_on_off_stateKNX address for reading the on/off state. DPT 1on_off_invertInvert on/off. Default:Falsegroup_address_active_stateKNX address for reading if the climate device is currently active. DPT 1group_address_command_value_stateKNX address for reading the current command value / valve position in %. DPT 5.001group_address_humidity_stateKNX address of current room humidity. DPT 9.007sync_statedefines if and how often the value should be actively read from the bus. IfFalseno GroupValueRead telegrams will be sent to its group address. Defaults toTruemax_tempMaximum value for target temperature.min_tempMinimum value for target temperature.fan_speed_modeDefines the mode of fan speed control. Can be eitherFanSpeedMode.STEPfor step-wise control orFanSpeedMode.PERCENTfor percentage control. ForSTEPmode, the fan speed is controlled by sending integer values, and the group address uses DPT 5.010. ForPERCENTmode, the fan speed is controlled by sending percentage values (0-100%), and the group address uses DPT 5.001. Default:FanSpeedMode.PERCENT.modeClimateMode instance for this climate devicegroup_address_operation_modeKNX address for operation mode. DPT 20.102group_address_operation_mode_stateKNX address for operation mode status. DPT 20.102group_address_operation_mode_protectionKNX address for switching on/off building protection mode. DPT 1group_address_operation_mode_economyKNX address for switching on/off economy mode. DPT 1group_address_operation_mode_comfortKNX address for switching on/off comfort mode. DPT 1group_address_operation_mode_standbyKNX address for switching on/off standby mode. DPT 1group_address_controller_statusKNX address for controller status.group_address_controller_status_stateKNX address for controller status state.group_address_controller_modeKNX address for controller mode. DPT 20.105group_address_controller_mode_stateKNX address for controller mode status. DPT 20.105group_address_heat_coolKNX address for switching heating / cooling mode. DPT 1group_address_heat_cool_stateKNX address for reading heating / cooling mode. DPT 1operation_modesOverrides the supported operation modes.controller_modesOverrides the supported controller modes.device_updated_cbCallback for each update.
Note: group_address_operation_mode_protection / group_address_operation_mode_economy / 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, Building Protection and Economy 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_economy=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,
controller_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='',
group_address_fan_speed=None,
group_address_fan_speed_state=None,
group_address_swing=None,
group_address_swing_sate=None,
group_address_horizontal_swing=None,
group_address_horizontal_swing_state=None,
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,
fan_speed_mode=FanSpeedMode.STEP,
group_address_humidity_state='',
)
xknx.devices.async_add(climate)
xknx.devices.async_add(climate_mode)
# 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(wait_for_result=True)
print("Current temperature: ", climate.temperature)
# Shutdown the Climate and the underlying ClimateMode!
climate.shutdown()
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'
)