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.pull/15430/head
parent
4c6394b307
commit
c587536547
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue