Have homekit_controller use device registry (#23874)

* Add device registry support

* HK doesn't use mac as a connection id
This commit is contained in:
Jc2k 2019-05-17 07:41:21 +01:00 committed by Martin Hjelmare
parent edf34eea94
commit 5b0d1415ad
6 changed files with 101 additions and 0 deletions

View file

@ -218,3 +218,13 @@ class HKDevice():
This id is random and will change if a device undergoes a hard reset.
"""
return self.pairing_data['AccessoryPairingID']
@property
def connection_info(self):
"""Return accessory information for the main accessory."""
return get_bridge_information(self.accessories)
@property
def name(self):
"""Name of the bridge accessory."""
return get_accessory_name(self.connection_info) or self.unique_id