From d334d0d4583f750a0e1a6cb11cc7fe66057ae860 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 22 Dec 2025 23:16:28 -1000 Subject: [PATCH 1/2] tweaks --- esphome/components/pid/pid_climate.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/esphome/components/pid/pid_climate.cpp b/esphome/components/pid/pid_climate.cpp index ba3b8ec98a..6ef01698be 100644 --- a/esphome/components/pid/pid_climate.cpp +++ b/esphome/components/pid/pid_climate.cpp @@ -1,5 +1,4 @@ #include "pid_climate.h" -#include "esphome/core/entity_base.h" #include "esphome/core/log.h" namespace esphome { @@ -163,16 +162,14 @@ void PIDClimate::start_autotune(std::unique_ptr &&autotune) { float min_value = this->supports_cool_() ? -1.0f : 0.0f; float max_value = this->supports_heat_() ? 1.0f : 0.0f; this->autotuner_->config(min_value, max_value); - char object_id_buf[OBJECT_ID_MAX_LEN]; - StringRef object_id = this->get_object_id_to(object_id_buf); - this->autotuner_->set_autotuner_id(object_id.str()); + this->autotuner_->set_autotuner_id(this->get_name().str()); ESP_LOGI(TAG, "%s: Autotune has started. This can take a long time depending on the " "responsiveness of your system. Your system " "output will be altered to deliberately oscillate above and below the setpoint multiple times. " "Until your sensor provides a reading, the autotuner may display \'nan\'", - object_id.c_str()); + this->get_name().c_str()); this->set_interval("autotune-progress", 10000, [this]() { if (this->autotuner_ != nullptr && !this->autotuner_->is_finished()) @@ -180,7 +177,8 @@ void PIDClimate::start_autotune(std::unique_ptr &&autotune) { }); if (mode != climate::CLIMATE_MODE_HEAT_COOL) { - ESP_LOGW(TAG, "%s: !!! For PID autotuner you need to set AUTO (also called heat/cool) mode!", object_id.c_str()); + ESP_LOGW(TAG, "%s: !!! For PID autotuner you need to set AUTO (also called heat/cool) mode!", + this->get_name().c_str()); } } From 3009da14f1af6954ffe1ea4c8be81f46f75b5463 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 22 Dec 2025 23:17:15 -1000 Subject: [PATCH 2/2] tweaks --- esphome/components/pid/pid_climate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/pid/pid_climate.cpp b/esphome/components/pid/pid_climate.cpp index 6ef01698be..2094c0e942 100644 --- a/esphome/components/pid/pid_climate.cpp +++ b/esphome/components/pid/pid_climate.cpp @@ -162,7 +162,7 @@ void PIDClimate::start_autotune(std::unique_ptr &&autotune) { float min_value = this->supports_cool_() ? -1.0f : 0.0f; float max_value = this->supports_heat_() ? 1.0f : 0.0f; this->autotuner_->config(min_value, max_value); - this->autotuner_->set_autotuner_id(this->get_name().str()); + this->autotuner_->set_autotuner_id(this->get_name()); ESP_LOGI(TAG, "%s: Autotune has started. This can take a long time depending on the "