Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerance / precision behavior seems wrong #10

Open
rvdbijl opened this issue Apr 9, 2022 · 4 comments
Open

Tolerance / precision behavior seems wrong #10

rvdbijl opened this issue Apr 9, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@rvdbijl
Copy link

rvdbijl commented Apr 9, 2022

In heating mode, if I have the tolerance set to 1F and the precision to 0.1F, and the setpoint to 68F, it turns on at 66.9F, but turns off right away when it gets to 67.1F. I would expect it to turn on at 66.9F, and turn off at 68F.

@KixAss
Copy link

KixAss commented Sep 30, 2022

Same issue here.

@KixAss
Copy link

KixAss commented Sep 30, 2022

@rvdbijl You can fix it by changing 2 lines in climate.py:

Line 988:
return target_temp >= (self._cur_temp + (0 if self._is_heter_active else self._cold_tolerance))

Line 993:
return self._cur_temp >= (target_temp + (0 if self._is_cooler_active else self._hot_tolerance))

@swingerman swingerman self-assigned this Oct 3, 2022
@swingerman
Copy link
Owner

Could you guys please post your configuration here? I cannot reproduce the problem

@micksam7
Copy link

micksam7 commented Oct 18, 2022

Same problem here. This seems to only occur when in dual Heat/Cool mode. In normal Heat or normal Cool mode, it behaves as expected.

climate:
  - platform: dual_smart_thermostat
    name: Adv Basement Heatpump
    heater: input_boolean.basement_heatpump_heat
    cooler: input_boolean.basement_heatpump_cool
    target_sensor: sensor.average_basement_temperature
    target_temp: 70
    target_temp_high: 71
    target_temp_low: 69
    cold_tolerance: .5
    hot_tolerance: .5
    min_cycle_duration:
      seconds: 60
    keep_alive:
      minutes: 3
    precision: 0.1

image

Changing the climate.py lines as referenced in KixAss's comment partly fixes, but heats/cools only to the set point instead of using the upper/lower tolerances.

A proper fix may be changing _async_control_heat_cool:
from

            too_cold = self._is_too_cold("_target_temp_low")
            too_hot = self._is_too_hot("_target_temp_high")

to

            too_cold = self._is_too_cold("_target_temp_low")
            # keep heater on until set point
            if self._is_heter_active and not self._is_too_hot("_target_temp_low"):
                too_cold = True

            too_hot = self._is_too_hot("_target_temp_high")
            # keep cooler on until set point
            if self._is_cooler_active and not self._is_too_cold("_target_temp_high"):
                too_hot = True

or perhaps changing the logic of async_heater_cooler_toggle

@swingerman swingerman added the bug Something isn't working label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants