diff --git a/src/display.cpp b/src/display.cpp index 0d2305c..a17391d 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -398,8 +398,8 @@ void CUDDisplay::handle_touch(uint8_t page_id, uint8_t element_id, uint8_t touch } else { - // If it is not, turn it on - this->cards.ac->setMode(previous_mode); + // If it is not, turn it on, always set the mode to cool when turning on + this->cards.ac->setMode(AC_MODE_COOL); } return; } @@ -958,7 +958,7 @@ void CUDDisplay::system_toggle() if (!this->cards.outputCard->getState(this->conf->air_purifier_pin)) this->cards.outputCard->setState(this->conf->air_purifier_pin, true); if (!get_ac_lock()) - this->cards.ac->setMode(previous_mode); + this->cards.ac->setMode(AC_MODE_COOL); } }