Skip to content

Commit

Permalink
Allow Celsius temperature setting
Browse files Browse the repository at this point in the history
Before: Only F temp could be set.

Now: Check appliance units and use appropriate range for units.
  • Loading branch information
amaisano authored Jun 7, 2023
1 parent 3b8e354 commit 63e7319
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frigidaire/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,14 @@ def set_humidity(cls, humidity: int) -> List[Component]:

@classmethod
def set_temperature(cls, temperature: int) -> List[Component]:
# This is a restriction set by Frigidaire
if temperature < 60 or temperature > 90:
raise FrigidaireException("Temperature must be between 60 and 90 degrees, inclusive")
# These are restrictions set by Frigidaire
if ContainerId.UNIT == 0:
if temperature < 60 or temperature > 90:
raise FrigidaireException("Temperature must be between 60 and 90 degrees, inclusive")

if ContainerId.UNIT == 1:
if temperature < 16 or temperature > 32:
raise FrigidaireException("Temperature must be between 16 and 32 degrees, inclusive")

return [
Component(HaclCode.TARGET_TEMPERATURE, "Container"),
Expand Down

0 comments on commit 63e7319

Please sign in to comment.