Skip to content

Commit

Permalink
Fixed booting when we do not have a setpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexwijn committed May 15, 2023
1 parent 669e4f7 commit 1a1bc43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/sat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down

0 comments on commit 1a1bc43

Please sign in to comment.