From 353caaf4ffa7ee0b4cbd3db711ea3f04b05709ae Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 24 Oct 2025 09:33:38 -0700 Subject: [PATCH 1/2] touch ups --- esphome/components/tuya/select/tuya_select.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/esphome/components/tuya/select/tuya_select.cpp b/esphome/components/tuya/select/tuya_select.cpp index d9dc532771..7c1cd09d06 100644 --- a/esphome/components/tuya/select/tuya_select.cpp +++ b/esphome/components/tuya/select/tuya_select.cpp @@ -10,7 +10,6 @@ void TuyaSelect::setup() { this->parent_->register_listener(this->select_id_, [this](const TuyaDatapoint &datapoint) { uint8_t enum_value = datapoint.value_enum; ESP_LOGV(TAG, "MCU reported select %u value %u", this->select_id_, enum_value); - const auto &options = this->traits.get_options(); auto mappings = this->mappings_; auto it = std::find(mappings.cbegin(), mappings.cend(), enum_value); if (it == mappings.end()) { From 1ea48df6d68fa5188fd08f053c388fa819cdd0fd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 24 Oct 2025 17:40:56 -0700 Subject: [PATCH 2/2] save some bytes --- esphome/components/select/select_traits.cpp | 2 +- esphome/components/select/select_traits.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/select/select_traits.cpp b/esphome/components/select/select_traits.cpp index dc849b8b7e..c6ded98ebf 100644 --- a/esphome/components/select/select_traits.cpp +++ b/esphome/components/select/select_traits.cpp @@ -3,7 +3,7 @@ namespace esphome { namespace select { -void SelectTraits::set_options(std::initializer_list options) { this->options_ = options; } +void SelectTraits::set_options(const std::initializer_list &options) { this->options_ = options; } void SelectTraits::set_options(const FixedVector &options) { this->options_.init(options.size()); diff --git a/esphome/components/select/select_traits.h b/esphome/components/select/select_traits.h index b504f08298..ee59a030ad 100644 --- a/esphome/components/select/select_traits.h +++ b/esphome/components/select/select_traits.h @@ -8,7 +8,7 @@ namespace select { class SelectTraits { public: - void set_options(std::initializer_list options); + void set_options(const std::initializer_list &options); void set_options(const FixedVector &options); const FixedVector &get_options() const;