1
mirror of https://github.com/home-assistant/core synced 2024-07-18 12:02:20 +02:00

Set min and max temp only if it is not None (#32262)

This commit is contained in:
Petro31 2020-02-28 03:49:47 -05:00 committed by GitHub
parent 1d962aeb65
commit 2c1c395c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,7 +335,7 @@ class GenericThermostat(ClimateDevice, RestoreEntity):
@property
def min_temp(self):
"""Return the minimum temperature."""
if self._min_temp:
if self._min_temp is not None:
return self._min_temp
# get default temp from super class
@ -344,7 +344,7 @@ class GenericThermostat(ClimateDevice, RestoreEntity):
@property
def max_temp(self):
"""Return the maximum temperature."""
if self._max_temp:
if self._max_temp is not None:
return self._max_temp
# Get default temp from super class