Complete OPERATION_MODES (#25069)
XKNX library has complete list of KNX controller modes, but current version of HA KNX climate plugin uses only two of them and one is named incorrectly ("Dehumidification" instead of "Dry"). https://github.com/XKNX/xknx/blob/master/xknx/knx/dpt_hvac_mode.py I've added missing control modes, which has corresponding operation mode in HA. Tested this patch on my KNX IntesisBox which is used with Mitsubishi split AC, all modes were detected correctly and working as expected. I've also corrected datapoint number in a comment, because it was pointing to a wrong one: http://www.sti.uniurb.it/romanell/Domotica_e_Edifici_Intelligenti/110504-Lez10a-KNX-Datapoint%20Types%20v1.5.00%20AS.pdf see page 94.
This commit is contained in:
parent
4844477d3a
commit
42d2f30ab8
1 changed files with 8 additions and 4 deletions
|
@ -6,8 +6,8 @@ import voluptuous as vol
|
|||
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
|
||||
from homeassistant.components.climate.const import (
|
||||
HVAC_MODE_DRY, HVAC_MODE_FAN_ONLY, HVAC_MODE_HEAT, HVAC_MODE_OFF,
|
||||
PRESET_ECO, PRESET_SLEEP, PRESET_AWAY, PRESET_COMFORT,
|
||||
SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATURE)
|
||||
HVAC_MODE_COOL, HVAC_MODE_AUTO, PRESET_ECO, PRESET_SLEEP, PRESET_AWAY,
|
||||
PRESET_COMFORT, SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATURE)
|
||||
from homeassistant.const import ATTR_TEMPERATURE, CONF_NAME, TEMP_CELSIUS
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
@ -44,9 +44,13 @@ DEFAULT_SETPOINT_SHIFT_MAX = 6
|
|||
DEFAULT_SETPOINT_SHIFT_MIN = -6
|
||||
# Map KNX operation modes to HA modes. This list might not be full.
|
||||
OPERATION_MODES = {
|
||||
# Map DPT 201.104 HVAC control modes
|
||||
# Map DPT 201.105 HVAC control modes
|
||||
"Auto": HVAC_MODE_AUTO,
|
||||
"Heat": HVAC_MODE_HEAT,
|
||||
"Cool": HVAC_MODE_COOL,
|
||||
"Off": HVAC_MODE_OFF,
|
||||
"Fan only": HVAC_MODE_FAN_ONLY,
|
||||
"Dehumidification": HVAC_MODE_DRY
|
||||
"Dry": HVAC_MODE_DRY
|
||||
}
|
||||
|
||||
OPERATION_MODES_INV = dict((
|
||||
|
|
Loading…
Add table
Reference in a new issue