Fix missing breaks and have slightly more optimism on mode changes

This commit is contained in:
Phil Genera 2020-06-06 09:17:40 -04:00
parent bf9259ce0a
commit 7e91b6bdae

View File

@ -118,6 +118,7 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
case climate::CLIMATE_MODE_DRY: case climate::CLIMATE_MODE_DRY:
hp->setModeSetting("DRY"); hp->setModeSetting("DRY");
hp->setPowerSetting("ON"); hp->setPowerSetting("ON");
this->action = climate::CLIMATE_ACTION_DRYING;
updated = true; updated = true;
break; break;
case climate::CLIMATE_MODE_AUTO: case climate::CLIMATE_MODE_AUTO:
@ -242,6 +243,7 @@ void MitsubishiHeatPump::hpSettingsChanged() {
this->mode = climate::CLIMATE_MODE_HEAT; this->mode = climate::CLIMATE_MODE_HEAT;
} else if (strcmp(currentSettings.mode, "DRY") == 0) { } else if (strcmp(currentSettings.mode, "DRY") == 0) {
this->mode = climate::CLIMATE_MODE_DRY; this->mode = climate::CLIMATE_MODE_DRY;
this->action = climate::CLIMATE_ACTION_DRYING;
} else if (strcmp(currentSettings.mode, "COOL") == 0) { } else if (strcmp(currentSettings.mode, "COOL") == 0) {
this->mode = climate::CLIMATE_MODE_COOL; this->mode = climate::CLIMATE_MODE_COOL;
} else if (strcmp(currentSettings.mode, "FAN") == 0) { } else if (strcmp(currentSettings.mode, "FAN") == 0) {
@ -339,8 +341,10 @@ void MitsubishiHeatPump::hpStatusChanged(heatpumpStatus currentStatus) {
else { else {
this->action = climate::CLIMATE_ACTION_IDLE; this->action = climate::CLIMATE_ACTION_IDLE;
} }
break;
case climate::CLIMATE_MODE_FAN_ONLY: case climate::CLIMATE_MODE_FAN_ONLY:
this->action = climate::CLIMATE_ACTION_FAN; this->action = climate::CLIMATE_ACTION_FAN;
break;
default: default:
this->action = climate::CLIMATE_ACTION_OFF; this->action = climate::CLIMATE_ACTION_OFF;
} }