device: fix debug message error

This commit is contained in:
Peter F. Patel-Schneider 2021-04-02 10:23:36 -04:00
parent 6ed09d0643
commit a4b54df433
1 changed files with 1 additions and 1 deletions

View File

@ -1155,7 +1155,7 @@ def decipher_unified_battery(report):
discharge, level, status, _ignore = _unpack('!BBBB', report[:4]) discharge, level, status, _ignore = _unpack('!BBBB', report[:4])
status = BATTERY_STATUS[status] status = BATTERY_STATUS[status]
if _log.isEnabledFor(_DEBUG): if _log.isEnabledFor(_DEBUG):
_log.debug('battery %s%% charged, level %s, charging %s', discharge, status) _log.debug('battery %s%% charged, level %s, charging %s', discharge, level, status)
level = ( level = (
_BATTERY_APPROX.full if level == 8 # full _BATTERY_APPROX.full if level == 8 # full
else _BATTERY_APPROX.good if level == 4 # good else _BATTERY_APPROX.good if level == 4 # good