From f9a4a8a82ea454dcc27c00dd6b23472f6af6d1c4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 22 Dec 2025 23:11:12 -1000 Subject: [PATCH] tweaks --- esphome/components/pid/pid_climate.cpp | 2 +- esphome/components/prometheus/prometheus_handler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/pid/pid_climate.cpp b/esphome/components/pid/pid_climate.cpp index 25aae7c4cb..ba3b8ec98a 100644 --- a/esphome/components/pid/pid_climate.cpp +++ b/esphome/components/pid/pid_climate.cpp @@ -165,7 +165,7 @@ void PIDClimate::start_autotune(std::unique_ptr &&autotune) { 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(std::string(object_id.c_str())); + this->autotuner_->set_autotuner_id(object_id.str()); ESP_LOGI(TAG, "%s: Autotune has started. This can take a long time depending on the " diff --git a/esphome/components/prometheus/prometheus_handler.cpp b/esphome/components/prometheus/prometheus_handler.cpp index 95ddc87b7e..9ae4a74718 100644 --- a/esphome/components/prometheus/prometheus_handler.cpp +++ b/esphome/components/prometheus/prometheus_handler.cpp @@ -117,7 +117,7 @@ std::string PrometheusHandler::relabel_id_(EntityBase *obj) { } char object_id_buf[OBJECT_ID_MAX_LEN]; StringRef object_id = obj->get_object_id_to(object_id_buf); - return std::string(object_id.c_str()); + return object_id.str(); } std::string PrometheusHandler::relabel_name_(EntityBase *obj) {