[water_heater] Combine log statements to reduce loop blocking (#12858)

This commit is contained in:
J. Nick Koston
2026-01-03 15:01:12 -10:00
committed by GitHub
parent 5e24469ce3
commit 5f5edf90e9
@@ -152,8 +152,10 @@ void WaterHeater::setup() {
void WaterHeater::publish_state() {
auto traits = this->get_traits();
ESP_LOGD(TAG, "'%s' - Sending state:", this->name_.c_str());
ESP_LOGD(TAG, " Mode: %s", LOG_STR_ARG(water_heater_mode_to_string(this->mode_)));
ESP_LOGD(TAG,
"'%s' - Sending state:\n"
" Mode: %s",
this->name_.c_str(), LOG_STR_ARG(water_heater_mode_to_string(this->mode_)));
if (!std::isnan(this->current_temperature_)) {
ESP_LOGD(TAG, " Current Temperature: %.2f°C", this->current_temperature_);
}