Skip to content

Commit

Permalink
Enable relative modulation in PWM when we are in the OFF cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexwijn committed Jan 21, 2025
1 parent 41161bc commit cf29544
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/sat/relative_modulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def state(self) -> RelativeModulationState:
if self._coordinator.hot_water_active:
return RelativeModulationState.HOT_WATER

if not self._pulse_width_modulation_enabled:
if self._coordinator.setpoint is None or self._coordinator.setpoint <= MINIMUM_SETPOINT:
return RelativeModulationState.COLD
if self._coordinator.setpoint is None or self._coordinator.setpoint <= MINIMUM_SETPOINT:
return RelativeModulationState.COLD

return RelativeModulationState.PULSE_WIDTH_MODULATION_OFF
if self._pulse_width_modulation_enabled:
return RelativeModulationState.OFF

return RelativeModulationState.OFF
return RelativeModulationState.PULSE_WIDTH_MODULATION_OFF

@property
def enabled(self) -> bool:
Expand Down

0 comments on commit cf29544

Please sign in to comment.