Fix zwave_js target_temp_low (#47762)

This commit is contained in:
Chris 2021-03-11 16:28:38 -07:00 committed by Paulus Schoutsen
parent 544844d865
commit 726eb69b40

View File

@ -287,7 +287,12 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity):
@property
def target_temperature_low(self) -> Optional[float]:
"""Return the lowbound target temperature we try to reach."""
if self._current_mode and self._current_mode.value is None:
# guard missing value
return None
if len(self._current_mode_setpoint_enums) > 1:
return self.target_temperature
return None
@property
def preset_mode(self) -> Optional[str]: