Skip to content

Commit

Permalink
Fixed an issue with determining if we need to run a normal cycle or not:
Browse files Browse the repository at this point in the history
- Make sure we use the calculated setpoint to determine if we are overshooting or not and not the actual boiler setpoint
  • Loading branch information
Alexwijn committed May 16, 2023
1 parent 1a1bc43 commit e177ae6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions custom_components/sat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,10 @@ def valves_open(self) -> bool:
@property
def pulse_width_modulation_enabled(self) -> bool:
"""Return True if pulse width modulation is enabled, False otherwise."""
if self._setpoint is None:
return False

if not self._coordinator.supports_setpoint_management or self._force_pulse_width_modulation:
return True

return self._overshoot_protection and self._setpoint < (self._store.get(STORAGE_OVERSHOOT_PROTECTION_VALUE) - 2)
return self._overshoot_protection and self._calculate_control_setpoint() < (self._store.get(STORAGE_OVERSHOOT_PROTECTION_VALUE) - 2)

@property
def relative_modulation_enabled(self):
Expand All @@ -577,7 +574,7 @@ def relative_modulation_enabled(self):

return self.hvac_mode == HVACMode.HEAT and not self.pulse_width_modulation_enabled

def _get_requested_setpoint(self):
def _get_requested_setpoint(self) -> float:
"""Get the requested setpoint based on the heating curve and PID output."""
if self._heating_curve.value is None:
return MINIMUM_SETPOINT
Expand Down

0 comments on commit e177ae6

Please sign in to comment.