mirror of
https://github.com/esphome/esphome.git
synced 2025-09-27 15:42:22 +01:00
Replace CLIMATE_MODE_AUTO with CLIMATE_MODE_HEAT_COOL in most cases (#1933)
This commit is contained in:
@@ -20,7 +20,7 @@ void PIDClimate::setup() {
|
||||
restore->to_call(this).perform();
|
||||
} else {
|
||||
// restore from defaults, change_away handles those for us
|
||||
this->mode = climate::CLIMATE_MODE_AUTO;
|
||||
this->mode = climate::CLIMATE_MODE_HEAT_COOL;
|
||||
this->target_temperature = this->default_target_temperature_;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ void PIDClimate::control(const climate::ClimateCall &call) {
|
||||
this->target_temperature = *call.get_target_temperature();
|
||||
|
||||
// If switching to non-auto mode, set output immediately
|
||||
if (this->mode != climate::CLIMATE_MODE_AUTO)
|
||||
if (this->mode != climate::CLIMATE_MODE_HEAT_COOL)
|
||||
this->handle_non_auto_mode_();
|
||||
|
||||
this->publish_state();
|
||||
@@ -39,7 +39,7 @@ void PIDClimate::control(const climate::ClimateCall &call) {
|
||||
climate::ClimateTraits PIDClimate::traits() {
|
||||
auto traits = climate::ClimateTraits();
|
||||
traits.set_supports_current_temperature(true);
|
||||
traits.set_supports_auto_mode(true);
|
||||
traits.set_supports_heat_cool_mode(true);
|
||||
traits.set_supports_two_point_target_temperature(false);
|
||||
traits.set_supports_cool_mode(this->supports_cool_());
|
||||
traits.set_supports_heat_mode(this->supports_heat_());
|
||||
@@ -121,14 +121,14 @@ void PIDClimate::update_pid_() {
|
||||
// keep autotuner instance so that subsequent dump_configs will print the long result message.
|
||||
} else {
|
||||
value = res.output;
|
||||
if (mode != climate::CLIMATE_MODE_AUTO) {
|
||||
if (mode != climate::CLIMATE_MODE_HEAT_COOL) {
|
||||
ESP_LOGW(TAG, "For PID autotuner you need to set AUTO (also called heat/cool) mode!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->mode != climate::CLIMATE_MODE_AUTO) {
|
||||
if (this->mode != climate::CLIMATE_MODE_HEAT_COOL) {
|
||||
this->handle_non_auto_mode_();
|
||||
} else {
|
||||
this->write_output_(value);
|
||||
|
Reference in New Issue
Block a user