From d01e9ff17d49fe108c7dcc7feadae73ff60305d7 Mon Sep 17 00:00:00 2001 From: David Conran Date: Sat, 12 Jun 2021 18:58:32 +1000 Subject: [PATCH] IRac: Fix off-by-one error in Coolix's sleep. Use the correct expression to set sleep mode. i.e. `0` or more is supposed to set the sleep mode. See comments for the method. --- src/IRac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IRac.cpp b/src/IRac.cpp index 7c5b9e6ad..316d7562a 100644 --- a/src/IRac.cpp +++ b/src/IRac.cpp @@ -460,7 +460,7 @@ void IRac::coolix(IRCoolixAC *ac, ac->setTurbo(); ac->send(); } - if (sleep > 0) { + if (sleep >= 0) { // Sleep has a special command that needs to be sent independently. ac->setSleep(); ac->send();