Glob support in "entity_config" in HomeKit integration?

Hey there all,

Is it possible to use globs/regex/wildcards in the entity_config section of the HomeKit YAML? Such as:

# Apple HomeKit
homekit:
  - name: hass.io
    filter:
      include_domains:
        - climate
        - cover
        - light
        - lock
        - switch
        - camera
      exclude_entity_globs:
        - switch.3w*
        - switch.multirelay*
        - light.tv_switch
    entity_config:
      "switch.*lights":     <------
        type: light

My use case is that I have about 50 Inovelli LZW30 and LZW30-SN switches, and Home Assistant rightfully shows them as switches. However all but a few are actually “lights” to the average person (like, “Dining Room Lights”, or “Master Bedroom Lights”). As such, I’d love to remap them for HomeKit so my WAF (wife approval factor :wink: ) goes up.

I could do them all manually, but I’m trying to minimize the amount of YAML I need to put in, and globs would also somewhat future-proof me as well, as I’ll be redoing my basement next year and will likely add more Inovelli switches at that point.

Let me know if this is possible, or if I’m just missing something obvious. Thanks!

1 Like

Nudging this. Any ideas on how to programmatically add these items to HomeKit?

Thanks!