Finish deduplicating homekit_controller enumeration tests (#64306)
This commit is contained in:
parent
05c177e3ed
commit
f0fdd7d650
27 changed files with 1091 additions and 1029 deletions
|
@ -214,7 +214,11 @@ class HKDevice:
|
|||
|
||||
devices = {}
|
||||
|
||||
for accessory in self.entity_map.accessories:
|
||||
# Accessories need to be created in the correct order or setting up
|
||||
# relationships with ATTR_VIA_DEVICE may fail.
|
||||
for accessory in sorted(
|
||||
self.entity_map.accessories, key=lambda accessory: accessory.aid
|
||||
):
|
||||
info = accessory.services.first(
|
||||
service_type=ServicesTypes.ACCESSORY_INFORMATION,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue