mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +00:00
Reduce entity memory usage by eliminating field shadowing and bit-packing (#9076)
This commit is contained in:
@@ -10,7 +10,7 @@ void Select::publish_state(const std::string &state) {
|
||||
auto index = this->index_of(state);
|
||||
const auto *name = this->get_name().c_str();
|
||||
if (index.has_value()) {
|
||||
this->has_state_ = true;
|
||||
this->set_has_state(true);
|
||||
this->state = state;
|
||||
ESP_LOGD(TAG, "'%s': Sending state %s (index %zu)", name, state.c_str(), index.value());
|
||||
this->state_callback_.call(state, index.value());
|
||||
|
||||
Reference in New Issue
Block a user