From a073ec4e11c5db0d27b096a0addb68cc2cff92ea Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 30 Oct 2025 20:19:07 -0500 Subject: [PATCH] simplify --- esphome/components/climate/climate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/climate/climate.cpp b/esphome/components/climate/climate.cpp index fc26ff524a..3656f57cc2 100644 --- a/esphome/components/climate/climate.cpp +++ b/esphome/components/climate/climate.cpp @@ -659,13 +659,11 @@ bool Climate::set_custom_preset_(const std::string &preset) { return this->set_c void Climate::clear_custom_preset_() { this->custom_preset_ = nullptr; } const char *Climate::find_custom_fan_mode_(const char *custom_fan_mode) { - auto traits = this->get_traits(); - return traits.find_custom_fan_mode_(custom_fan_mode); + return this->get_traits().find_custom_fan_mode_(custom_fan_mode); } const char *Climate::find_custom_preset_(const char *custom_preset) { - auto traits = this->get_traits(); - return traits.find_custom_preset_(custom_preset); + return this->get_traits().find_custom_preset_(custom_preset); } void Climate::dump_traits_(const char *tag) {