1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-12 06:43:48 +01: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

@@ -211,7 +211,7 @@ void SGP4xComponent::measure_raw_() {
if (!this->write_command(command, data, 2)) {
ESP_LOGD(TAG, "write error (%d)", this->last_error_);
this->status_set_warning("measurement request failed");
this->status_set_warning(LOG_STR("measurement request failed"));
return;
}
@@ -220,7 +220,7 @@ void SGP4xComponent::measure_raw_() {
raw_data[1] = 0;
if (!this->read_data(raw_data, response_words)) {
ESP_LOGD(TAG, "read error (%d)", this->last_error_);
this->status_set_warning("measurement read failed");
this->status_set_warning(LOG_STR("measurement read failed"));
this->voc_index_ = this->nox_index_ = UINT16_MAX;
return;
}