@@ -433,7 +433,7 @@ def handle_pairing_lock(receiver: Receiver, notification: HIDPPNotification) ->
433
433
receiver .pairing .new_device = None
434
434
pair_error = ord (notification .data [:1 ])
435
435
if pair_error :
436
- receiver .pairing .error = error_string = hidpp10_constants .PairingError (pair_error )
436
+ receiver .pairing .error = error_string = hidpp10_constants .PairingError (pair_error ). name
437
437
receiver .pairing .new_device = None
438
438
logger .warning ("pairing error %d: %s" , pair_error , error_string )
439
439
receiver .changed (reason = reason )
@@ -453,7 +453,7 @@ def handle_discovery_status(receiver: Receiver, notification: HIDPPNotification)
453
453
receiver .pairing .device_passkey = None
454
454
discover_error = ord (notification .data [:1 ])
455
455
if discover_error :
456
- receiver .pairing .error = discover_string = hidpp10_constants .BoltPairingError (discover_error )
456
+ receiver .pairing .error = discover_string = hidpp10_constants .BoltPairingError (discover_error ). name
457
457
logger .warning ("bolt discovering error %d: %s" , discover_error , discover_string )
458
458
receiver .changed (reason = reason )
459
459
return True
@@ -495,7 +495,7 @@ def handle_pairing_status(receiver: Receiver, notification: HIDPPNotification) -
495
495
elif notification .address == 0x02 and not pair_error :
496
496
receiver .pairing .new_device = receiver .register_new_device (notification .data [7 ])
497
497
if pair_error :
498
- receiver .pairing .error = error_string = hidpp10_constants .BoltPairingError (pair_error )
498
+ receiver .pairing .error = error_string = hidpp10_constants .BoltPairingError (pair_error ). name
499
499
receiver .pairing .new_device = None
500
500
logger .warning ("pairing error %d: %s" , pair_error , error_string )
501
501
receiver .changed (reason = reason )
0 commit comments