Use upstream constants when defining homekit service to platform mapping (#65272)
This commit is contained in:
parent
58f624a3da
commit
eb94fe1ca7
3 changed files with 34 additions and 29 deletions
|
@ -494,7 +494,11 @@ class HKDevice:
|
|||
tasks = []
|
||||
for accessory in self.accessories:
|
||||
for service in accessory["services"]:
|
||||
stype = ServicesTypes.get_short(service["type"].upper())
|
||||
try:
|
||||
stype = ServicesTypes.get_short_uuid(service["type"].upper())
|
||||
except KeyError:
|
||||
stype = service["type"].upper()
|
||||
|
||||
if stype in HOMEKIT_ACCESSORY_DISPATCH:
|
||||
platform = HOMEKIT_ACCESSORY_DISPATCH[stype]
|
||||
if platform not in self.platforms:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue