Help Needed Homekit integration via yaml file

Hi all,

could somebody help me and letting me know what it’s wrong with the following yaml file?
I’m trying integrating some HA entities in Homekit by using a dedicated homekit.yaml file and its link !include in the configuration.yaml.
The link is working correctly but I must be doing something wrong in the homekit.yaml file since every time I try, the integration is not excluding anything…

homekit:
  filter:
    exclude_domains:
      - automation
      - demo
      - input_boolean
      - remote
      - scenes
      - scripts
    exclude_entity_globs:
      - light.lampara*
    include_entities:
      - light.lampara_comedor
      - remote.harmony_hub
  entity_config:
    switch.enchufe_bano:
      type: outlet
1 Like

I only ise includes, but according to the documentation example I would the filter list begin with the includes, followed from the excludes.

I tried to modify the yaml file by using includes and not excludes, but the integration continues not filtering the entities.

Could you please, publish your conf so I can compare?

Sure:


homekit:   ## <— because I'm using packages
  name: Home Assistant
  filter:
    include_domains:
      - alarm_control_panel
    include_entities:
      - binary_sensor.bewegungsmelder_flur
      - binary_sensor.bewegungsmelder_garderobe
      - binary_sensor.katzendetektor
      - binary_sensor.bewegungsmelder_katzenklo
      - binary_sensor.schlafzfenster
      - binary_sensor.vibrationssensor
      - binary_sensor.wassersensor
      
      - climate.ir_heizung
      
      - counter.katzenklo_besuche
      
      - input_boolean.diele_dauerlicht
      - input_boolean.xxx_zuhause
      - input_boolean.yyy_zuhause
      
    #   - input_select.hue_gruppen
    #   - input_select.hue_szenen
      
      - light.leselampe_xxx
      - light.leselampe_yyy
      - light.loggia_spot
      - light.steckdosenleiste
      
      - scene.fernsehen
      - scene.essen
      - sensor.briefkasten
      - sensor.katzendetektor_log
      
    #   - switch.steckdose_1
    #   - switch.steckdose_2
    #   - switch.steckdose_3

  entity_config:
    alarm_control_panel.ha_alarm:
      code: !secret alarm_code






Finally I got it working correctly.
The problem was the first line: I didn’t need the “homekit:” on top.

Thanks a lot for the help! The comment on your yaml file was the clue to start my tests.

:+1: Glad to hear!

Hi. What do you mean you didn’t need the homekit on top?

I’m trying to change some entities from switches to sockets and I’m unable. Would you mind sharing your code and/or steps?

EDIT: I realize now by reading the documentation that a Homekit integration set up via UI cannot be changed via yaml, as that creates another bridge.

Thank you!