From 4d28315dff0696c5f19ce2f6c069c13818dace7b Mon Sep 17 00:00:00 2001 From: Alex Wijnholds Date: Mon, 8 May 2023 18:20:11 +0200 Subject: [PATCH] Fixed an issue with setting the correct maximum relative modulation value --- custom_components/sat/opentherm/coordinator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/sat/opentherm/coordinator.py b/custom_components/sat/opentherm/coordinator.py index 130759cf..1fbf4fa2 100644 --- a/custom_components/sat/opentherm/coordinator.py +++ b/custom_components/sat/opentherm/coordinator.py @@ -155,7 +155,7 @@ def _calculate_max_relative_mod(self, climate: SatClimate) -> int: """ setpoint = float(self.get(gw_vars.DATA_CONTROL_SETPOINT)) - if climate.hvac_mode == HVACMode.HEAT or bool(self.get(gw_vars.DATA_SLAVE_DHW_ACTIVE)) or setpoint <= MINIMUM_SETPOINT: + if climate.hvac_mode != HVACMode.HEAT or bool(self.get(gw_vars.DATA_SLAVE_DHW_ACTIVE)) or setpoint <= MINIMUM_SETPOINT: return MAXIMUM_RELATIVE_MOD if self._overshoot_protection and not self._force_pulse_width_modulation: