Skip to content

Commit

Permalink
LG A/C: Potential fix for A/C power off issue.
Browse files Browse the repository at this point in the history
LG's A/C power off sets the temp to a special value. So move the `setPower()` call to last in `IRac::lg()` so it happens after any temp changes.

Ref: #1298 (comment)
Fixes #1298
  • Loading branch information
crankyoldgit committed Oct 15, 2020
1 parent ecfc472 commit 4d81211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,6 @@ void IRac::lg(IRLgAc *ac, const lg_ac_remote_model_t model,
const float degrees, const stdAc::fanspeed_t fan) {
ac->begin();
ac->setModel(model);
ac->setPower(on);
ac->setMode(ac->convertMode(mode));
ac->setTemp(degrees);
ac->setFan(ac->convertFan(fan));
Expand All @@ -1268,6 +1267,7 @@ void IRac::lg(IRLgAc *ac, const lg_ac_remote_model_t model,
// No Beep setting available.
// No Sleep setting available.
// No Clock setting available.
ac->setPower(on); // Power off affects temp, so do after setting the temp.
ac->send();
}
#endif // SEND_LG
Expand Down

0 comments on commit 4d81211

Please sign in to comment.