Skip to content

Commit

Permalink
Merge branch 'rospogrigio:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulCavill authored Oct 11, 2023
2 parents 0126e19 + e5009fd commit 79cc9ca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions custom_components/localtuya/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,22 @@ def min_temp(self):
"""Return the minimum temperature."""
if self.has_config(CONF_MIN_TEMP_DP):
return self.dps_conf(CONF_MIN_TEMP_DP)
return DEFAULT_MIN_TEMP
# DEFAULT_MIN_TEMP is in C
if self.temperature_unit == TEMP_FAHRENHEIT:
return DEFAULT_MIN_TEMP * 1.8 + 32
else:
return DEFAULT_MIN_TEMP

@property
def max_temp(self):
"""Return the maximum temperature."""
if self.has_config(CONF_MAX_TEMP_DP):
return self.dps_conf(CONF_MAX_TEMP_DP)
return DEFAULT_MAX_TEMP
# DEFAULT_MAX_TEMP is in C
if self.temperature_unit == TEMP_FAHRENHEIT:
return DEFAULT_MAX_TEMP * 1.8 + 32
else:
return DEFAULT_MAX_TEMP

def status_updated(self):
"""Device status was updated."""
Expand Down

0 comments on commit 79cc9ca

Please sign in to comment.