Fix #321, skip hid devices with battery (#322)

This commit is contained in:
bobslept 2021-12-21 18:25:46 +01:00 committed by GitHub
parent 40d0671b1a
commit dd5d871769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -198,6 +198,10 @@ def charging():
# we found some power supplies, lets check their state
else:
for supply in power_supplies:
# skip battery of hid devices
# see issue #321
if "hid" in supply.lower():
continue
try:
with open(Path(power_supply_path + supply + "/type")) as f:
supply_type = f.read()[:-1]