0

How can I identify an HMAccessory as a bridge? Perhaps I have missed something but I cannot seem to find any HMServiceType or HMCharacteristicType that corresponds to a bridge. Any help appreciated.

Christian R
  • 1,545
  • 3
  • 13
  • 17

2 Answers2

0

There is a category: HMAccessoryCategoryType property on HMAccessory where HMAccessoryCategoryTypeBridge represents bridge apparently. The online docs seem to be missing a lot of new properties and functions introduced in iOS9. One can also use uniqueIdentifiersForBridgedAccessories: [NSUUID]? on HMAccessory which returns non-nil if the accessory is a bridge

Christian R
  • 1,545
  • 3
  • 13
  • 17
0

You can find out if an accessory is a bridge using the following code when inspecting a specific accessory:

if accessory.category.categoryType == HMAccessoryCategoryTypeBridge {
  print("I'M A BRIDGE")
}
Paul Bonneville
  • 1,905
  • 2
  • 13
  • 17