mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Reduce entity memory usage by eliminating field shadowing and bit-packing (#9076)
This commit is contained in:
@@ -56,7 +56,7 @@ void NextionBinarySensor::set_state(bool state, bool publish, bool send_to_nexti
|
||||
this->publish_state(state);
|
||||
} else {
|
||||
this->state = state;
|
||||
this->has_state_ = true;
|
||||
this->set_has_state(true);
|
||||
}
|
||||
|
||||
this->update_component_settings();
|
||||
|
||||
@@ -88,7 +88,7 @@ void NextionSensor::set_state(float state, bool publish, bool send_to_nextion) {
|
||||
} else {
|
||||
this->raw_state = state;
|
||||
this->state = state;
|
||||
this->has_state_ = true;
|
||||
this->set_has_state(true);
|
||||
}
|
||||
}
|
||||
this->update_component_settings();
|
||||
|
||||
@@ -37,7 +37,7 @@ void NextionTextSensor::set_state(const std::string &state, bool publish, bool s
|
||||
this->publish_state(state);
|
||||
} else {
|
||||
this->state = state;
|
||||
this->has_state_ = true;
|
||||
this->set_has_state(true);
|
||||
}
|
||||
|
||||
this->update_component_settings();
|
||||
|
||||
Reference in New Issue
Block a user