1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 15:12:06 +00:00

Merge branch 'select_options' into integration

This commit is contained in:
J. Nick Koston
2025-10-30 13:28:38 -05:00

View File

@@ -26,7 +26,10 @@ void Select::publish_state(size_t index) {
const char *option = this->option_at(index);
this->set_has_state(true);
this->active_index_ = index;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
this->state = option; // Update deprecated member for backward compatibility
#pragma GCC diagnostic pop
ESP_LOGD(TAG, "'%s': Sending state %s (index %zu)", this->get_name().c_str(), option, index);
// Callback signature requires std::string, create temporary for compatibility
this->state_callback_.call(std::string(option), index);