mirror of
https://github.com/esphome/esphome.git
synced 2026-05-25 18:47:56 +08:00
[thermostat] make comparisons consistent with documentation (#13499)
CI / Create common environment (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.11) (push) Has been cancelled
CI / Determine which jobs to run (push) Has been cancelled
CI / Run integration tests (push) Has been cancelled
CI / Run C++ unit tests (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Run script/clang-tidy for ZEPHYR (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Test components batch (${{ matrix.components }}) (push) Has been cancelled
CI / pre-commit.ci lite (push) Has been cancelled
CI / Build target branch for memory impact (push) Has been cancelled
CI / Build PR branch for memory impact (push) Has been cancelled
CI / Comment memory impact (push) Has been cancelled
CI / CI Status (push) Has been cancelled
Stale / stale (push) Has been cancelled
Lock closed issues and PRs / lock (push) Has been cancelled
Publish Release / Initialize build (push) Has been cancelled
Publish Release / Build and publish to PyPi (push) Has been cancelled
Publish Release / Build ESPHome amd64 (push) Has been cancelled
Publish Release / Build ESPHome arm64 (push) Has been cancelled
Publish Release / Publish ESPHome docker to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome docker to ghcr (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to ghcr (push) Has been cancelled
Publish Release / deploy-ha-addon-repo (push) Has been cancelled
Publish Release / deploy-esphome-schema (push) Has been cancelled
Publish Release / version-notifier (push) Has been cancelled
Synchronise Device Classes from Home Assistant / Sync Device Classes (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.11) (push) Has been cancelled
CI / Determine which jobs to run (push) Has been cancelled
CI / Run integration tests (push) Has been cancelled
CI / Run C++ unit tests (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Run script/clang-tidy for ZEPHYR (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Test components batch (${{ matrix.components }}) (push) Has been cancelled
CI / pre-commit.ci lite (push) Has been cancelled
CI / Build target branch for memory impact (push) Has been cancelled
CI / Build PR branch for memory impact (push) Has been cancelled
CI / Comment memory impact (push) Has been cancelled
CI / CI Status (push) Has been cancelled
Stale / stale (push) Has been cancelled
Lock closed issues and PRs / lock (push) Has been cancelled
Publish Release / Initialize build (push) Has been cancelled
Publish Release / Build and publish to PyPi (push) Has been cancelled
Publish Release / Build ESPHome amd64 (push) Has been cancelled
Publish Release / Build ESPHome arm64 (push) Has been cancelled
Publish Release / Publish ESPHome docker to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome docker to ghcr (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to ghcr (push) Has been cancelled
Publish Release / deploy-ha-addon-repo (push) Has been cancelled
Publish Release / deploy-esphome-schema (push) Has been cancelled
Publish Release / version-notifier (push) Has been cancelled
Synchronise Device Classes from Home Assistant / Sync Device Classes (push) Has been cancelled
This commit is contained in:
@@ -1060,11 +1060,11 @@ bool ThermostatClimate::cooling_required_() {
|
||||
auto temperature = this->supports_two_points_ ? this->target_temperature_high : this->target_temperature;
|
||||
|
||||
if (this->supports_cool_) {
|
||||
if (this->current_temperature > temperature + this->cooling_deadband_) {
|
||||
// if the current temperature exceeds the target + deadband, cooling is required
|
||||
if (this->current_temperature >= temperature + this->cooling_deadband_) {
|
||||
// if the current temperature reaches or exceeds the target + deadband, cooling is required
|
||||
return true;
|
||||
} else if (this->current_temperature < temperature - this->cooling_overrun_) {
|
||||
// if the current temperature is less than the target - overrun, cooling should stop
|
||||
} else if (this->current_temperature <= temperature - this->cooling_overrun_) {
|
||||
// if the current temperature is less than or equal to the target - overrun, cooling should stop
|
||||
return false;
|
||||
} else {
|
||||
// if we get here, the current temperature is between target + deadband and target - overrun,
|
||||
@@ -1081,11 +1081,11 @@ bool ThermostatClimate::fanning_required_() {
|
||||
|
||||
if (this->supports_fan_only_) {
|
||||
if (this->supports_fan_only_cooling_) {
|
||||
if (this->current_temperature > temperature + this->cooling_deadband_) {
|
||||
// if the current temperature exceeds the target + deadband, fanning is required
|
||||
if (this->current_temperature >= temperature + this->cooling_deadband_) {
|
||||
// if the current temperature reaches or exceeds the target + deadband, fanning is required
|
||||
return true;
|
||||
} else if (this->current_temperature < temperature - this->cooling_overrun_) {
|
||||
// if the current temperature is less than the target - overrun, fanning should stop
|
||||
} else if (this->current_temperature <= temperature - this->cooling_overrun_) {
|
||||
// if the current temperature is less than or equal to the target - overrun, fanning should stop
|
||||
return false;
|
||||
} else {
|
||||
// if we get here, the current temperature is between target + deadband and target - overrun,
|
||||
@@ -1103,11 +1103,12 @@ bool ThermostatClimate::heating_required_() {
|
||||
auto temperature = this->supports_two_points_ ? this->target_temperature_low : this->target_temperature;
|
||||
|
||||
if (this->supports_heat_) {
|
||||
if (this->current_temperature < temperature - this->heating_deadband_) {
|
||||
// if the current temperature is below the target - deadband, heating is required
|
||||
if (this->current_temperature <= temperature - this->heating_deadband_) {
|
||||
// if the current temperature is below or equal to the target - deadband, heating is required
|
||||
return true;
|
||||
} else if (this->current_temperature > temperature + this->heating_overrun_) {
|
||||
// if the current temperature is above the target + overrun, heating should stop
|
||||
} else if (this->current_temperature >= temperature + this->heating_overrun_) {
|
||||
// if the current temperature is above or equal to the target + overrun, heating should stop
|
||||
|
||||
return false;
|
||||
} else {
|
||||
// if we get here, the current temperature is between target - deadband and target + overrun,
|
||||
|
||||
Reference in New Issue
Block a user