From 7db12c0a63516f4aec2b10fe733917e03e759f29 Mon Sep 17 00:00:00 2001 From: Anton Sergunov Date: Wed, 13 Nov 2024 14:10:22 +0000 Subject: [PATCH] naming --- esphome/components/pid/pid_climate.cpp | 4 ++-- esphome/components/pid/pid_climate.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/pid/pid_climate.cpp b/esphome/components/pid/pid_climate.cpp index 4f0b9c98c4..f7b61067f4 100644 --- a/esphome/components/pid/pid_climate.cpp +++ b/esphome/components/pid/pid_climate.cpp @@ -89,7 +89,7 @@ void PIDClimate::dump_config() { this->autotuner_->dump_config(); } } -float PIDClimate::value_by_mode_(float value) { +float PIDClimate::clamp_value_by_mode_(float value) { switch (this->mode) { case climate::CLIMATE_MODE_OFF: return 0.0f; @@ -102,7 +102,7 @@ float PIDClimate::value_by_mode_(float value) { } } void PIDClimate::write_output_() { - const float value = this->value_by_mode_(this->output_value_); + const float value = this->clamp_value_by_mode_(this->output_value_); // first ensure outputs are off (both outputs not active at the same time) if (this->supports_cool_() && value >= 0) diff --git a/esphome/components/pid/pid_climate.h b/esphome/components/pid/pid_climate.h index 70b3ca1623..76193a9e69 100644 --- a/esphome/components/pid/pid_climate.h +++ b/esphome/components/pid/pid_climate.h @@ -85,7 +85,7 @@ class PIDClimate : public climate::Climate, public Component { bool supports_heat_() const { return this->heat_output_ != nullptr; } /// Return cloest possible output value with respect to mode - float value_by_mode_(float value) const; + float clamp_value_by_mode_(float value) const; void write_output_();