Homekit does not exclude domains?

I have configured (at least, I thought so) Homekit to only add some specifically defined lights (to test the setup). Unfortunately, when pairing the bridge, 54 (!) ’ accessories’ are available, including all my automations. These are my defined bulbs, but also any auto discovered entity from any other domain than light.

Initial setup

homekit:
  auto_start: false # needed for hue and zwave to come up
  include_entities:
    - light.bank
    - light.bollamp
    - light.hoge_kast
    - light.standing_ikea_vaster
    - light.tv_meubel

After that, I also tried to exclude domains, but this had no effect whatsoever. I tried exclude_domains before and after the included_entries.

Exlusions after inclusions

homekit:
  auto_start: false # needed for hue and zwave to come up
  include_entities:
    - light.bank
    - light.bollamp
    - light.hoge_kast
    - light.standing_ikea_vaster
    - light.tv_meubel
  exclude_domains:
    ## exclude any unused domain to prevent auto discovery by bridge
    - alarm_control_panel
    - automation
    - binary_sensor
    - climate
    - cover
    - device_tracker
    - fan
    - input_boolean
    # - light
    - lock
    - media_player
    - remote
    - script
    - sensor
    - switch

Exclusions before inclusions

homekit:
  auto_start: false # needed for hue and zwave to come up
  exclude_domains:
    ## exclude any unused domain to prevent auto discovery by bridge
    - alarm_control_panel
    - automation
    - binary_sensor
    - climate
    - cover
    - device_tracker
    - fan
    - input_boolean
    # - light
    - lock
    - media_player
    - remote
    - script
    - sensor
    - switch
  include_entities:
    - light.bank
    - light.bollamp
    - light.hoge_kast
    - light.standing_ikea_vaster
    - light.tv_meubel

Running hassio 0.71.0.

==> What am I doing wrong?
==> How can I include explicitly defined entities only?

Please help.

Ping. Anyone?

@metbril Please take a look at the example code in the documentation: https://www.home-assistant.io/components/homekit/

I believe you missed the filter parameter. The config should look something like this:

homekit:
  auto_start: false
  filter:
    exclude_domains:
      - automation
    include_entities:
      - light.xyz

:man_facepalming:

I guess you’re right. Will try this asap and report back.

1 Like

Filter clause added. Issue fixed.