Merge pull request #8 from geoffdavis/drying

Add "idle" states during heating and cooling.
This commit is contained in:
Geoff Davis 2020-06-02 20:34:24 -07:00 committed by GitHub
commit 896157f028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,13 +310,20 @@ void MitsubishiHeatPump::hpSettingsChanged() {
if (this->current_temperature < this->target_temperature) { if (this->current_temperature < this->target_temperature) {
this->action = climate::CLIMATE_ACTION_HEATING; this->action = climate::CLIMATE_ACTION_HEATING;
} }
else {
this->action = climate::CLIMATE_ACTION_IDLE;
}
break; break;
case climate::CLIMATE_MODE_COOL: case climate::CLIMATE_MODE_COOL:
case climate::CLIMATE_MODE_DRY:
if (this->current_temperature > this->target_temperature) { if (this->current_temperature > this->target_temperature) {
this->action = climate::CLIMATE_ACTION_COOLING; this->action = climate::CLIMATE_ACTION_COOLING;
} }
else {
this->action = climate::CLIMATE_ACTION_IDLE;
}
break; break;
case climate::CLIMATE_MODE_DRY:
this->action = climate::CLIMATE_ACTION_DRYING;
default: default:
this->action = climate::CLIMATE_ACTION_OFF; this->action = climate::CLIMATE_ACTION_OFF;
} }