1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-26 20:53:50 +00:00

[esp8266] Store component warning strings in flash to reduce RAM usage (#10623)

This commit is contained in:
J. Nick Koston
2025-09-06 23:56:45 -05:00
committed by GitHub
parent 4d09932320
commit c33bb3a8a9
26 changed files with 70 additions and 55 deletions

View File

@@ -6,7 +6,7 @@ namespace m5stack_8angle {
void M5Stack8AngleSwitchBinarySensor::update() {
int8_t out = this->parent_->read_switch();
if (out == -1) {
this->status_set_warning("Could not read binary sensor state from M5Stack 8Angle.");
this->status_set_warning(LOG_STR("Could not read binary sensor state from M5Stack 8Angle."));
return;
}
this->publish_state(out != 0);

View File

@@ -7,7 +7,7 @@ void M5Stack8AngleKnobSensor::update() {
if (this->parent_ != nullptr) {
int32_t raw_pos = this->parent_->read_knob_pos_raw(this->channel_, this->bits_);
if (raw_pos == -1) {
this->status_set_warning("Could not read knob position from M5Stack 8Angle.");
this->status_set_warning(LOG_STR("Could not read knob position from M5Stack 8Angle."));
return;
}
if (this->raw_) {