Skip to content

Commit

Permalink
Merge pull request #33 from OptimusGREEN/fix-fan-speed
Browse files Browse the repository at this point in the history
fix fan speed in argon-status
  • Loading branch information
JeffCurless authored Dec 30, 2022
2 parents d78f5a7 + f813db1 commit 1bd5f46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions argononed.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def load_unitconfig(fname):

def getCurrentFanSpeed():
try:
return int(speed.read_text())
return int(float(speed.read_text()))
except FileNotFoundError:
return None

Expand Down Expand Up @@ -241,7 +241,7 @@ def writeSpeed(theSpeed):
# Spin up to prevent issues on older units
bus.write_byte(ADDR_FAN,100)
time.sleep(1)
bus.write_byte(ADDR_FAN,newspeed)
bus.write_byte(ADDR_FAN,int(newspeed))
except IOError:
return prevspeed
writeSpeed (newspeed)
Expand Down

0 comments on commit 1bd5f46

Please sign in to comment.