Skip to content

Commit 8699361

Browse files
committed
Correct the percent range check
1 parent 06170bc commit 8699361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_lc709203f.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def low_voltage_alarm_percent(self) -> int:
245245
def low_voltage_alarm_percent(self, percent: int) -> None:
246246
"""Set the low voltage alarm percentage.
247247
Value of 0 disables the alarm"""
248-
if not 0 < percent < 100:
248+
if not 0 <= percent <= 100:
249249
raise ValueError("alarm voltage percent must be 0-100")
250250
self._write_word(LC709203F_CMD_ALARMPERCENT, percent)
251251

0 commit comments

Comments
 (0)