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:
@@ -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);
|
||||
|
||||
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user