[core] Optimize and normalize entity state publishing logs with >> format

This commit is contained in:
J. Nick Koston
2026-01-14 22:24:57 -10:00
parent 78aee4f498
commit b28fda6899
16 changed files with 19 additions and 20 deletions
+2 -2
View File
@@ -20,9 +20,9 @@ void Text::publish_state(const char *state, size_t len) {
this->state.assign(state, len);
}
if (this->traits.get_mode() == TEXT_MODE_PASSWORD) {
ESP_LOGD(TAG, "'%s': Sending state " LOG_SECRET("'%s'"), this->get_name().c_str(), this->state.c_str());
ESP_LOGD(TAG, "'%s' >> " LOG_SECRET("'%s'"), this->get_name().c_str(), this->state.c_str());
} else {
ESP_LOGD(TAG, "'%s': Sending state %s", this->get_name().c_str(), this->state.c_str());
ESP_LOGD(TAG, "'%s' >> '%s'", this->get_name().c_str(), this->state.c_str());
}
this->state_callback_.call(this->state);
#if defined(USE_TEXT) && defined(USE_CONTROLLER_REGISTRY)