mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 15:35:59 -07:00
Merge branch 'error_logstr' into integration
This commit is contained in:
@@ -333,6 +333,12 @@ void Component::status_set_warning(const LogString *message) {
|
||||
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"));
|
||||
}
|
||||
void Component::status_set_error() {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
this->status_set_error(nullptr);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
void Component::status_set_error(const char *message) {
|
||||
if ((this->component_state_ & STATUS_LED_ERROR) != 0)
|
||||
return;
|
||||
|
||||
@@ -227,9 +227,10 @@ class Component {
|
||||
void status_set_warning(const char *message = nullptr);
|
||||
void status_set_warning(const LogString *message);
|
||||
|
||||
void status_set_error(); // Set error flag without message
|
||||
// Remove before 2026.6.0
|
||||
ESPDEPRECATED("Use status_set_error(LOG_STR(message)) instead. Will stop working in 2026.6.0", "2025.12.0")
|
||||
void status_set_error(const char *message = nullptr);
|
||||
void status_set_error(const char *message);
|
||||
void status_set_error(const LogString *message);
|
||||
|
||||
void status_clear_warning();
|
||||
|
||||
Reference in New Issue
Block a user