Climate IR LG -keep previous temp and fan if swing (#1556)

Swing IR command does not carry CLIMATE_FAN or TEMP within itself, so previous states sould be kept. Tested with actual LG IR remote controller.
This commit is contained in:
Otamay 2021-02-25 15:26:19 -06:00 committed by GitHub
parent 3d0310d0e0
commit 92b36720b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,7 +139,6 @@ bool LgIrClimate::on_receive(remote_base::RemoteReceiveData data) {
} else {
this->mode = climate::CLIMATE_MODE_COOL;
}
}
// Temperature
if (this->mode == climate::CLIMATE_MODE_COOL)
@ -158,6 +157,7 @@ bool LgIrClimate::on_receive(remote_base::RemoteReceiveData data) {
else if ((remote_state & FAN_MASK) == FAN_MAX)
this->fan_mode = climate::CLIMATE_FAN_HIGH;
}
}
this->publish_state();
return true;