diff --git a/esphome/components/copy/select/copy_select.cpp b/esphome/components/copy/select/copy_select.cpp index fde7e3d92d..a424ff3d7f 100644 --- a/esphome/components/copy/select/copy_select.cpp +++ b/esphome/components/copy/select/copy_select.cpp @@ -12,7 +12,7 @@ void CopySelect::setup() { traits.set_options(source_->traits.get_options()); if (source_->has_state()) - this->publish_state(source_->current_option()); + this->publish_state(source_->active_index().value()); } void CopySelect::dump_config() { LOG_SELECT("", "Copy Select", this); } diff --git a/esphome/components/ld2450/select/baud_rate_select.cpp b/esphome/components/ld2450/select/baud_rate_select.cpp index 06439aaa75..f40d75e827 100644 --- a/esphome/components/ld2450/select/baud_rate_select.cpp +++ b/esphome/components/ld2450/select/baud_rate_select.cpp @@ -5,7 +5,7 @@ namespace ld2450 { void BaudRateSelect::control(const std::string &value) { this->publish_state(value); - this->parent_->set_baud_rate(state); + this->parent_->set_baud_rate(value); } } // namespace ld2450 diff --git a/esphome/components/ld2450/select/zone_type_select.cpp b/esphome/components/ld2450/select/zone_type_select.cpp index a9f6155142..b7c1024ec2 100644 --- a/esphome/components/ld2450/select/zone_type_select.cpp +++ b/esphome/components/ld2450/select/zone_type_select.cpp @@ -5,7 +5,7 @@ namespace ld2450 { void ZoneTypeSelect::control(const std::string &value) { this->publish_state(value); - this->parent_->set_zone_type(state); + this->parent_->set_zone_type(value); } } // namespace ld2450