ha-dual-smart-thermostat icon indicating copy to clipboard operation
ha-dual-smart-thermostat copied to clipboard

Tolerance / precision behavior seems wrong

Open rvdbijl opened this issue 2 years ago • 4 comments

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.

rvdbijl avatar Apr 09 '22 15:04 rvdbijl

Same issue here.

KixAss avatar Sep 30 '22 17:09 KixAss

@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))

KixAss avatar Sep 30 '22 18:09 KixAss

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

swingerman avatar Oct 05 '22 20:10 swingerman

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

micksam7 avatar Oct 18 '22 09:10 micksam7