Skip to content

Commit

Permalink
Allow Celsius temperature setting (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Adamo Maisano <[email protected]>
  • Loading branch information
bm1549 and amaisano authored Jun 29, 2024
1 parent 994fb54 commit bfa28e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frigidaire/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ 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")

# Note: Frigidaire sets limits for temperature which could cause this action to fail
# Temperature ranges are below, inclusive of the endpoints
# Fahrenheit: 60-90
# Celsius: 16-32
return [
Component(Setting.TEMPERATURE_REPRESENTATION, Unit.FAHRENHEIT),
Component(Setting.TARGET_TEMPERATURE_F, temperature),
Expand Down

0 comments on commit bfa28e1

Please sign in to comment.