Skip to content

Commit

Permalink
Correct the percent range check
Browse files Browse the repository at this point in the history
  • Loading branch information
jrrickerson committed Apr 28, 2023
1 parent 06170bc commit 8699361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_lc709203f.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def low_voltage_alarm_percent(self) -> int:
def low_voltage_alarm_percent(self, percent: int) -> None:
"""Set the low voltage alarm percentage.
Value of 0 disables the alarm"""
if not 0 < percent < 100:
if not 0 <= percent <= 100:
raise ValueError("alarm voltage percent must be 0-100")
self._write_word(LC709203F_CMD_ALARMPERCENT, percent)

Expand Down

0 comments on commit 8699361

Please sign in to comment.