1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

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

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;