diff --git a/lib/logitech_receiver/hidpp10.py b/lib/logitech_receiver/hidpp10.py index e351331d..0818ef16 100644 --- a/lib/logitech_receiver/hidpp10.py +++ b/lib/logitech_receiver/hidpp10.py @@ -237,7 +237,7 @@ def parse_battery_status(register, reply): BATTERY_STATUS.discharging if status_byte == 0x30 else BATTERY_STATUS.recharging if status_byte == 0x50 else BATTERY_STATUS.full if status_byte == 0x90 else None ) - return charge, status_text, None + return charge, None, status_text, None if register == REGISTERS.battery_status: status_byte = ord(reply[:1]) diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py index b746406b..5eee0780 100644 --- a/lib/logitech_receiver/notifications.py +++ b/lib/logitech_receiver/notifications.py @@ -234,8 +234,8 @@ def _process_hidpp10_custom_notification(device, status, n): # message layout: 10 ix <00> assert n.data[-1:] == b'\x00' data = chr(n.address).encode() + n.data - charge, status_text, next_charge = _hidpp10.parse_battery_status(n.sub_id, data) - status.set_battery_info(charge, next_charge, status_text, None) + charge, next_charge, status_text, voltage = _hidpp10.parse_battery_status(n.sub_id, data) + status.set_battery_info(charge, next_charge, status_text, voltage) return True if n.sub_id == _R.keyboard_illumination: