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_();