This commit is contained in:
J. Nick Koston
2025-12-22 23:11:12 -10:00
parent 7944fe6993
commit 9205cb3d67
2 changed files with 2 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ void PIDClimate::start_autotune(std::unique_ptr<PIDAutotuner> &&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 "

View File

@@ -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) {