From 1b5a942f6160c711efc8b4f1846f0f045506e899 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 30 Oct 2025 20:58:02 -0500 Subject: [PATCH] fixes --- esphome/components/thermostat/thermostat_climate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/components/thermostat/thermostat_climate.cpp b/esphome/components/thermostat/thermostat_climate.cpp index d2f5db3b32..8258fa9d65 100644 --- a/esphome/components/thermostat/thermostat_climate.cpp +++ b/esphome/components/thermostat/thermostat_climate.cpp @@ -1197,6 +1197,9 @@ void ThermostatClimate::change_custom_preset_(const std::string &custom_preset) } else { ESP_LOGI(TAG, "No changes required to apply custom preset %s", custom_preset.c_str()); } + // Note: set_custom_preset_() above handles preset.reset() and custom_preset_ assignment internally. + // The old code had these lines here unconditionally, which was a bug (double assignment, state modification + // even when no changes were needed). Now properly handled by the protected setter with mutual exclusion. } else { ESP_LOGW(TAG, "Custom preset %s not configured; ignoring", custom_preset.c_str()); }