From c5875365471a9d6eedaa82971c685d3cfb9610e0 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Thu, 12 Jul 2018 02:52:37 -0700 Subject: [PATCH] Ignore some HomeKit devices (#15316) There are some devices that speak HomeKit that we shouldn't expose. Some bridges (such as the Hue) provide reduced functionality over HomeKit and have a functional native API, so should be ignored. We also shouldn't offer to configure the built-in Home Assistant HomeKit bridge. --- homeassistant/components/homekit_controller/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/homeassistant/components/homekit_controller/__init__.py b/homeassistant/components/homekit_controller/__init__.py index 34fdcb2c035..237a6d219f0 100644 --- a/homeassistant/components/homekit_controller/__init__.py +++ b/homeassistant/components/homekit_controller/__init__.py @@ -26,6 +26,12 @@ HOMEKIT_ACCESSORY_DISPATCH = { 'thermostat': 'climate', } +HOMEKIT_IGNORE = [ + 'BSB002', + 'Home Assistant Bridge', + 'TRADFRI gateway' +] + KNOWN_ACCESSORIES = "{}-accessories".format(DOMAIN) KNOWN_DEVICES = "{}-devices".format(DOMAIN) @@ -237,6 +243,9 @@ def setup(hass, config): hkid = discovery_info['properties']['id'] config_num = int(discovery_info['properties']['c#']) + if model in HOMEKIT_IGNORE: + return + # Only register a device once, but rescan if the config has changed if hkid in hass.data[KNOWN_DEVICES]: device = hass.data[KNOWN_DEVICES][hkid]