18 void setup()
override;
113 auto tuner = make_unique<PIDAutotuner>();
114 tuner->set_noiseband(this->noiseband_);
115 tuner->set_output_negative(this->negative_output_);
116 tuner->set_output_positive(this->positive_output_);
117 this->parent_->start_autotune(std::move(tuner));
131 void play(Ts...
x) { this->parent_->reset_integral_term(); }
142 auto kp = this->kp_.value(
x...);
143 auto ki = this->ki_.value(
x...);
144 auto kd = this->kd_.value(
x...);
146 this->parent_->set_kp(kp);
147 this->parent_->set_ki(ki);
148 this->parent_->set_kd(kd);
152 TEMPLATABLE_VALUE(
float, kp)
153 TEMPLATABLE_VALUE(
float, ki)
154 TEMPLATABLE_VALUE(
float, kd)
float get_integral_term() const
This class is used to encode all control actions on a climate device.
void add_on_pid_computed_callback(std::function< void()> &&callback)
output::FloatOutput * cool_output_
bool supports_cool_() const
void reset_integral_term()
void set_kp_multiplier(float in)
void set_threshold_low(float in)
void set_cool_output(output::FloatOutput *cool_output)
void write_output_(float value)
sensor::Sensor * humidity_sensor_
The sensor used for getting the current humidity.
void set_default_target_temperature(float default_target_temperature)
Base class for all output components that can output a variable level, like PWM.
This class contains all static data for climate devices.
void set_output_samples(int in)
float get_threshold_low()
float get_kp_multiplier()
void set_heat_output(output::FloatOutput *heat_output)
void set_negative_output(float negative_output)
float get_kd_multiplier()
void set_kd_multiplier(float in)
int get_deadband_output_samples()
void set_positive_output(float positive_output)
void start_autotune(std::unique_ptr< PIDAutotuner > &&autotune)
void set_deadband_output_samples(int in)
std::unique_ptr< PIDAutotuner > autotuner_
void set_humidity_sensor(sensor::Sensor *sensor)
void set_starting_integral_term(float in)
void set_threshold_high(float in)
float get_error_value() const
float get_output_value() const
PIDSetControlParametersAction(PIDClimate *parent)
float get_derivative_term() const
int get_derivative_samples()
void set_noiseband(float noiseband)
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
void set_max_integral(float max_integral)
climate::ClimateTraits traits() override
Return the traits of this controller.
float get_ki_multiplier()
void set_starting_integral_term(float in)
sensor::Sensor * sensor_
The sensor used for getting the current temperature.
bool supports_heat_() const
void dump_config() override
output::FloatOutput * heat_output_
Implementation of SPI Controller mode.
void set_ki_multiplier(float in)
PIDController controller_
PIDResetIntegralTermAction(PIDClimate *parent)
float default_target_temperature_
float get_threshold_high()
void set_derivative_samples(int in)
Base-class for all sensors.
void set_min_integral(float min_integral)
float get_proportional_term() const
float output_value_
Output value as reported by the PID controller, for PIDClimateSensor.
CallbackManager< void()> pid_computed_callback_
esphome::sensor::Sensor * sensor
void set_sensor(sensor::Sensor *sensor)
ClimateDevice - This is the base class for all climate integrations.
PIDAutotuneAction(PIDClimate *parent)