Merge branch master into develop

This commit is contained in:
Geoff Davis 2021-06-23 04:30:45 -07:00
commit 4d5f99807e
3 changed files with 10 additions and 6 deletions

View File

@ -239,7 +239,7 @@ climate:
hardware_uart: UART2
baud_rate: 9600
supports:
mode: [AUTO, COOL, HEAT, FAN_ONLY]
mode: [HEAT_COOL, COOL, HEAT, FAN_ONLY]
fan_mode: [AUTO, LOW, MEDIUM, HIGH]
swing_mode: [OFF, VERTICAL]
visual:
@ -261,7 +261,7 @@ climate:
is 9 seconds due to underlying issues with the HeatPump library. Default: 500ms
* *supports* (_Optional_): Supported features for the device. ** *mode*
(_Optional_, list): Supported climate modes for the HeatPump. Default:
`['AUTO', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']`
`['HEAT_COOL', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']`
** *fan_mode* (_Optional_, list):
Supported fan speeds for the HeatPump. Default: `['AUTO', 'DIFFUSE', 'LOW',
'MEDIUM', 'MIDDLE', 'HIGH']` ** *swing_mode* (_Optional_, list): Supported

View File

@ -16,7 +16,7 @@ from esphome.core import CORE, coroutine
AUTO_LOAD = ["climate"]
CONF_SUPPORTS = "supports"
DEFAULT_CLIMATE_MODES = ['AUTO', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']
DEFAULT_CLIMATE_MODES = ['HEAT_COOL', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']
DEFAULT_FAN_MODES = ['AUTO', 'DIFFUSE', 'LOW', 'MEDIUM', 'MIDDLE', 'HIGH']
DEFAULT_SWING_MODES = ['OFF', 'VERTICAL']

View File

@ -141,7 +141,7 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
updated = true;
}
break;
case climate::CLIMATE_MODE_AUTO:
case climate::CLIMATE_MODE_HEAT_COOL:
hp->setModeSetting("AUTO");
hp->setPowerSetting("ON");
if (has_mode){
@ -291,7 +291,7 @@ void MitsubishiHeatPump::hpSettingsChanged() {
this->mode = climate::CLIMATE_MODE_FAN_ONLY;
this->action = climate::CLIMATE_ACTION_FAN;
} else if (strcmp(currentSettings.mode, "AUTO") == 0) {
this->mode = climate::CLIMATE_MODE_AUTO;
this->mode = climate::CLIMATE_MODE_HEAT_COOL;
if (auto_setpoint != currentSettings.temperature) {
auto_setpoint = currentSettings.temperature;
save(currentSettings.temperature, auto_storage);
@ -378,7 +378,7 @@ void MitsubishiHeatPump::hpStatusChanged(heatpumpStatus currentStatus) {
this->action = climate::CLIMATE_ACTION_IDLE;
}
break;
case climate::CLIMATE_MODE_AUTO:
case climate::CLIMATE_MODE_HEAT_COOL:
this->action = climate::CLIMATE_ACTION_IDLE;
if (currentStatus.operating) {
if (this->current_temperature > this->target_temperature) {
@ -428,6 +428,10 @@ void MitsubishiHeatPump::setup() {
ESP_LOGCONFIG(TAG, "Intializing new HeatPump object.");
this->hp = new HeatPump();
this->current_temperature = NAN;
this->target_temperature = NAN;
this->fan_mode = climate::CLIMATE_FAN_OFF;
this->swing_mode = climate::CLIMATE_SWING_OFF;
#ifdef USE_CALLBACKS
hp->setSettingsChangedCallback(