diff --git a/esphome/core/component.h b/esphome/core/component.h index db716d5b4a..51a9290e8b 100644 --- a/esphome/core/component.h +++ b/esphome/core/component.h @@ -159,7 +159,9 @@ class Component { virtual void mark_failed(); // Remove before 2026.6.0 - ESPDEPRECATED("Use mark_failed(LOG_STR(message)) instead. Will stop working in 2026.6.0", "2025.12.0") + ESPDEPRECATED("Use mark_failed(LOG_STR(\"static string literal\")) instead. Do NOT use .c_str() from temporary " + "strings. Will stop working in 2026.6.0", + "2025.12.0") void mark_failed(const char *message) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -229,7 +231,9 @@ class Component { 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") + ESPDEPRECATED("Use status_set_error(LOG_STR(\"static string literal\")) instead. Do NOT use .c_str() from temporary " + "strings. Will stop working in 2026.6.0", + "2025.12.0") void status_set_error(const char *message); void status_set_error(const LogString *message);