mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 06:12:20 +01:00
Merge branch 'warning_strings_flash' into integration
This commit is contained in:
@@ -287,7 +287,6 @@ void Component::status_set_warning(const char *message) {
|
|||||||
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
|
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
|
||||||
message ? message : LOG_STR_LITERAL("unspecified"));
|
message ? message : LOG_STR_LITERAL("unspecified"));
|
||||||
}
|
}
|
||||||
#ifdef USE_STORE_LOG_STR_IN_FLASH
|
|
||||||
void Component::status_set_warning(const LogString *message) {
|
void Component::status_set_warning(const LogString *message) {
|
||||||
// Don't spam the log. This risks missing different warning messages though.
|
// Don't spam the log. This risks missing different warning messages though.
|
||||||
if ((this->component_state_ & STATUS_LED_WARNING) != 0)
|
if ((this->component_state_ & STATUS_LED_WARNING) != 0)
|
||||||
@@ -297,7 +296,6 @@ void Component::status_set_warning(const LogString *message) {
|
|||||||
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
|
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
|
||||||
message ? LOG_STR_ARG(message) : LOG_STR_LITERAL("unspecified"));
|
message ? LOG_STR_ARG(message) : LOG_STR_LITERAL("unspecified"));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
void Component::status_set_error(const char *message) {
|
void Component::status_set_error(const char *message) {
|
||||||
if ((this->component_state_ & STATUS_LED_ERROR) != 0)
|
if ((this->component_state_ & STATUS_LED_ERROR) != 0)
|
||||||
return;
|
return;
|
||||||
|
@@ -207,9 +207,7 @@ class Component {
|
|||||||
bool status_has_error() const;
|
bool status_has_error() const;
|
||||||
|
|
||||||
void status_set_warning(const char *message = nullptr);
|
void status_set_warning(const char *message = nullptr);
|
||||||
#ifdef USE_STORE_LOG_STR_IN_FLASH
|
|
||||||
void status_set_warning(const LogString *message);
|
void status_set_warning(const LogString *message);
|
||||||
#endif
|
|
||||||
|
|
||||||
void status_set_error(const char *message = nullptr);
|
void status_set_error(const char *message = nullptr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user