diff --git a/esphome/core/component.cpp b/esphome/core/component.cpp index 803bc11e02..594e8ff7df 100644 --- a/esphome/core/component.cpp +++ b/esphome/core/component.cpp @@ -79,7 +79,7 @@ void Component::call_setup() { this->setup(); } void Component::call_dump_config() { this->dump_config(); if (this->is_failed()) { - ESP_LOGE(this->get_component_source(), " Component is marked FAILED"); + ESP_LOGE(TAG, " Component %s is marked FAILED", this->get_component_source()); } } @@ -154,26 +154,26 @@ void Component::status_set_warning(const char *message) { return; this->component_state_ |= STATUS_LED_WARNING; App.app_state_ |= STATUS_LED_WARNING; - ESP_LOGW(this->get_component_source(), "Warning set: %s", message); + ESP_LOGW(TAG, "Component %s set Warning flag: %s", this->get_component_source(), message); } void Component::status_set_error(const char *message) { if ((this->component_state_ & STATUS_LED_ERROR) != 0) return; this->component_state_ |= STATUS_LED_ERROR; App.app_state_ |= STATUS_LED_ERROR; - ESP_LOGE(this->get_component_source(), "Error set: %s", message); + ESP_LOGE(TAG, "Component %s set Error flag: %s", this->get_component_source(), message); } void Component::status_clear_warning() { if ((this->component_state_ & STATUS_LED_WARNING) == 0) return; this->component_state_ &= ~STATUS_LED_WARNING; - ESP_LOGW(this->get_component_source(), "Warning cleared"); + ESP_LOGW(TAG, "Component %s cleared Warning flag", this->get_component_source()); } void Component::status_clear_error() { if ((this->component_state_ & STATUS_LED_ERROR) == 0) return; this->component_state_ &= ~STATUS_LED_ERROR; - ESP_LOGE(this->get_component_source(), "Error cleared"); + ESP_LOGE(TAG, "Component %s cleared Error flag", this->get_component_source()); } void Component::status_momentary_warning(const std::string &name, uint32_t length) { this->status_set_warning();