Skip to content

Commit

Permalink
1.09-x - error handling
Browse files Browse the repository at this point in the history
don't just always turn off the pump
  • Loading branch information
brettonw committed Sep 13, 2022
1 parent 9d919b1 commit a7f4b0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/apex/apex.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ def set_dos_rate(self, did, profile_id, rate):

# turn the pump off to start - this will enable a new profile setting to start immediately
# without it, the DOS will wait until the current profile period expires
return self.set_variable(did, f"Set OFF")
off = self.set_variable(did, f"Set OFF")
if off["error"] != "":
return off

# check if the requested rate is greater than the OFF threshold
min_rate = 0.1
Expand Down

0 comments on commit a7f4b0c

Please sign in to comment.