From ee3631e93e409d81b3fecc5a51431fe99e39d203 Mon Sep 17 00:00:00 2001 From: Jc2k Date: Fri, 8 Feb 2019 10:00:51 +0000 Subject: [PATCH] Fix homekit_controller non-standard hk characteristics (#20824) --- homeassistant/components/homekit_controller/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homekit_controller/__init__.py b/homeassistant/components/homekit_controller/__init__.py index 72b7a502aa2..77d0825ef0b 100644 --- a/homeassistant/components/homekit_controller/__init__.py +++ b/homeassistant/components/homekit_controller/__init__.py @@ -224,7 +224,12 @@ class HomeKitEntity(Entity): if service['iid'] != self._iid: continue for char in service['characteristics']: - uuid = CharacteristicsTypes.get_uuid(char['type']) + try: + uuid = CharacteristicsTypes.get_uuid(char['type']) + except KeyError: + # If a KeyError is raised its a non-standard + # characteristic. We must ignore it in this case. + continue if uuid not in characteristic_types: continue self._setup_characteristic(char)