Feature Request: HomeKit

Hi guys,
My HA instance, (like most of you), has expanded out with great gobs of devices and entities. That combined with the 130 entry limit, (or whatever that magic number is). Sharing devices and entities with HomeKit has become problematic.

I know that there’s the *glob style inclusion/exclusion in the config file. I’ve taken to generating my own yaml file based on JQ queries and my own bash scripts.
However, what would be nice is if the sharing of devices/entities is based on those that are assigned to an area.

So, a good example is my current config for my front door, (with a lot of entities removed for brevity):

- name: HASS West External
  ip_address: x.x.x.x
  port: 24000
  filter:
    include_entity_globs:
      - binary_sensor.*west_external*
      - sensor.*west_external*
      - light.*west_external*
      - media_player.*west_external*
      - remote.*west_external*
      - binary_sensor.front_door_camera_*
      - camera.front_door_camera_*
    exclude_entities:
      - camera.front_door_camera_mainstream
      - binary_sensor.front_door_camera_tamper_detection
      - binary_sensor.front_door_camera_storage_failure
      - button.front_door_camera_set_system_date_and_time
      - sensor.ble_rssi_west_external_environment
      - sensor.ble_voltage_west_external_environment
      - sensor.front_door_camera_last_clock_synchronization
      - sensor.front_door_camera_last_reboot
      - sensor.front_door_camera_last_reset
      - sensor.front_door_camera_processor_usage
      - sensor.west_external_environment_sensor_signal_strength
      - sensor.west_external_environment_sensor_voltage
    include_entities:
      - binary_sensor.control_pir_as_binary_sensor
      - binary_sensor.night_detect_as_binary_sensor
      - binary_sensor.postponed_due_to_moisture_2
      - binary_sensor.postponed_due_to_moisture_3
      - light.control_pir
      - light.night_detect
      - light.west_external_light
      - number.countdown_minutes_2
      - number.countdown_minutes_3
      - sensor.irrigation_status_2
      - sensor.irrigation_status_3
      - sensor.soil_moisture_2
      - sensor.soil_moisture_3
      - sensor.soil_temperature_2
      - sensor.soil_temperature_3
      - sensor.water_spent_2
      - sensor.water_spent_3

As you would know, sometimes you don’t get a say in what unique_id an entity has and/or it’s unmanageable to make changes on a gazillion entries.

So, a simpler way would be something like this:

- name: HASS West External
  ip_address: x.x.x.x
  port: 24000
  filter:
    include_areas:
      - west_external
      - front_door
    exclude_entities:
      - camera.front_door_camera_mainstream
      - binary_sensor.front_door_camera_tamper_detection
      - binary_sensor.front_door_camera_storage_failure
      - button.front_door_camera_set_system_date_and_time
      - sensor.ble_rssi_west_external_environment
      - sensor.ble_voltage_west_external_environment
      - sensor.front_door_camera_last_clock_synchronization
      - sensor.front_door_camera_last_reboot
      - sensor.front_door_camera_last_reset
      - sensor.front_door_camera_processor_usage
      - sensor.west_external_environment_sensor_signal_strength
      - sensor.west_external_environment_sensor_voltage

Better still, if there was a way of also excluding entities within an area:

- name: HASS West External
  ip_address: x.x.x.x
  port: 24000
  filter:
    include_areas:
      - west_external
      - front_door
    exclude_areas:
      - west_external_exclude

Or maybe if there was a generic tag feature that you could set on entities:

- name: HASS West External
  ip_address: x.x.x.x
  port: 24000
  filter:
    include_areas:
      - west_external
      - front_door
    exclude_tags:
      - exclude_from_homekit

Then the whole assignment of devices and entities could be managed from areas rather than having them in configs and/or from the UI.