Allow set climate preset to NONE (#5588)

This commit is contained in:
dentra 2023-10-23 21:29:32 +03:00 committed by Jesse Hills
parent 0807d60c6a
commit 33e0f16b3b
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -213,6 +213,8 @@ ClimateCall &ClimateCall::set_preset(const std::string &preset) {
this->set_preset(CLIMATE_PRESET_SLEEP); this->set_preset(CLIMATE_PRESET_SLEEP);
} else if (str_equals_case_insensitive(preset, "ACTIVITY")) { } else if (str_equals_case_insensitive(preset, "ACTIVITY")) {
this->set_preset(CLIMATE_PRESET_ACTIVITY); this->set_preset(CLIMATE_PRESET_ACTIVITY);
} else if (str_equals_case_insensitive(preset, "NONE")) {
this->set_preset(CLIMATE_PRESET_NONE);
} else { } else {
if (this->parent_->get_traits().supports_custom_preset(preset)) { if (this->parent_->get_traits().supports_custom_preset(preset)) {
this->custom_preset_ = preset; this->custom_preset_ = preset;