diff --git a/lib/logitech_receiver/centurion.py b/lib/logitech_receiver/centurion.py index 00bb9e6f..6a411f78 100644 --- a/lib/logitech_receiver/centurion.py +++ b/lib/logitech_receiver/centurion.py @@ -35,6 +35,7 @@ from solaar import configuration from . import base from . import exceptions from . import hidpp10 +from . import hidpp10_constants from .centurion_constants import CenturionCoreFeature from .common import Alert from .common import Battery @@ -376,7 +377,7 @@ class CenturionReceiver: # Create child Device with receiver=self, number=1 pairing_info = { "wpid": self.product_id, - "kind": None, + "kind": hidpp10_constants.DEVICE_KIND.headset, # every Centurion-transport device so far is a headset "serial": None, "polling": None, "power_switch": None, diff --git a/tests/logitech_receiver/test_hidpp20_complex.py b/tests/logitech_receiver/test_hidpp20_complex.py index 39d2e456..14bce23b 100644 --- a/tests/logitech_receiver/test_hidpp20_complex.py +++ b/tests/logitech_receiver/test_hidpp20_complex.py @@ -1213,6 +1213,21 @@ def test_centurion_receiver_container_with_device(): recv[2] +def test_centurion_receiver_child_device_kind_headset(): + """notify_devices() seeds the headset child with kind=headset via pairing_info, + so the headphone icon shows even when the headset is powered off at startup.""" + info = FakeCenturionDeviceInfo(product="PRO X 2 LIGHTSPEED") + recv = CenturionReceiver(FakeLowLevel(), 0x99, info) + recv._pending = False + recv._dongle_features = [] + + recv.notify_devices() + + child = recv[1] + child.online = False + assert child.kind == "headset" + + def test_centurion_receiver_enable_connection_notifications(): """CenturionReceiver.enable_connection_notifications() returns False.""" info = FakeCenturionDeviceInfo()