cli: correct reporting for pairing with receivers that re-pair (i.e., c534)
This commit is contained in:
parent
d08e0a9574
commit
e89b50cdf2
|
@ -57,9 +57,13 @@ def run(receivers, args, find_receiver, _ignore):
|
||||||
assert n
|
assert n
|
||||||
if n.devnumber == 0xFF:
|
if n.devnumber == 0xFF:
|
||||||
_notifications.process(receiver, n)
|
_notifications.process(receiver, n)
|
||||||
elif n.sub_id == 0x41 and n.address == 0x04:
|
elif n.sub_id == 0x41: # allow for other protocols! (was and n.address == 0x04)
|
||||||
if n.devnumber not in known_devices:
|
if n.devnumber not in known_devices:
|
||||||
receiver.status.new_device = receiver[n.devnumber]
|
receiver.status.new_device = receiver[n.devnumber]
|
||||||
|
elif receiver.re_pairs:
|
||||||
|
# unfortunately this breaks encapsulation but the nice way tries to unpair
|
||||||
|
del receiver._devices[n.devnumber] # get rid of information on device re-paired away
|
||||||
|
receiver.status.new_device = receiver[n.devnumber]
|
||||||
|
|
||||||
timeout = 20 # seconds
|
timeout = 20 # seconds
|
||||||
receiver.handle = _HandleWithNotificationHook(receiver.handle)
|
receiver.handle = _HandleWithNotificationHook(receiver.handle)
|
||||||
|
|
Loading…
Reference in New Issue