From 1a1bc4306a3e5d95b5bb94b3412662dd3e430cef Mon Sep 17 00:00:00 2001 From: Alex Wijnholds Date: Mon, 15 May 2023 22:26:23 +0200 Subject: [PATCH] Fixed booting when we do not have a setpoint --- custom_components/sat/climate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/sat/climate.py b/custom_components/sat/climate.py index 027ca883..0c54b6f1 100644 --- a/custom_components/sat/climate.py +++ b/custom_components/sat/climate.py @@ -558,6 +558,9 @@ 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 @@ -566,7 +569,7 @@ def pulse_width_modulation_enabled(self) -> bool: @property def relative_modulation_enabled(self): """Return True if relative modulation is enabled, False otherwise.""" - if not self._coordinator.support_relative_modulation_management: + if self._setpoint is None or not self._coordinator.support_relative_modulation_management: return False if self._coordinator.hot_water_active: