From f1864fd211520d192da57af1c715f2eb9980fe3d Mon Sep 17 00:00:00 2001 From: Schmiddy Date: Wed, 22 Apr 2026 22:39:58 +0200 Subject: [PATCH] fix(centurion): route sub-device notifications via sub_inverse in get_feature Bridge MessageEvents arrive with sub_feat_idx + 0x100 as the notification sub_id. get_feature() only checked self.inverse (parent features), so sub- device feature notifications (including CENTURION_BATTERY_SOC charging changes) were silently dropped with 'invalid feature index'. Check sub_inverse at index - 0x100 for any index >= 0x100 so spontaneous notifications from the headset (e.g. charging status change) are correctly dispatched to the feature notification handler. --- lib/logitech_receiver/hidpp20.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/logitech_receiver/hidpp20.py b/lib/logitech_receiver/hidpp20.py index c8732deb..132c38df 100644 --- a/lib/logitech_receiver/hidpp20.py +++ b/lib/logitech_receiver/hidpp20.py @@ -301,6 +301,8 @@ class FeaturesArray(dict): feature = self.inverse.get(index) if feature is not None: return feature + if index >= 0x100: + return self.sub_inverse.get(index - 0x100) elif self._check(): feature = self.inverse.get(index) if feature is not None: