I would like to suggest a couple of process improvement changes to the HomeKit integration when acting in Bridge mode. Back when the primary way of configuring HomeKit was done in the YAML configuration, it was easy to exclude all entity types (Domains) and then simply manually include each of the individual entity ID’s that I wanted to pass on to HomeKit. Now that this is done via the GUI these days, I’ve found the process to be a bit buggy and I think that this “might” be a result (at least partially) of the simplified options when configuring in the GUI.
A Small Bit of Background:
First, for the last couple of years, I’ve had the HomeKit integration configuration set to Bridge mode (of course), Inclusion Mode=Include, with the following Domains selected:
- Button
- Binary Sensor
- Climate, Light
- Switch
- Fan
- Sensor
…Then I would select each of the individual entities within those domains I wanted to pass onto HomeKit. This worked well when I had only a handful of Z-Wave, Zigbee, and Tuya devices to pass onto HomeKit but as my entity count grew in number, I found that randomly, entities I had NOT selected on the entities to include page would appear in HomeKit anyways. If I removed them manually in HomeKit, they would reappear the next time I reloaded Home Assistant. I know this has to be a bug in the current iteration of the HomeKit controller because the “phantom appearing” entities would normally only be of one type, say binary_sensor, and only a handful of the entities I had not “included” would appear in HomeKit. It wasn’t passing through all of the known binary_sensor(s), and boy are their a lot of them.
Therefore, for one the inclusion and exclusion of domains and entities is a bit buggy with larger setups.
Currently, the inclusion/exclusion mode via the HomeKit Bridge GUI only effects the 2nd step (IE: including/excluding individual entities). If I set the exclusion mode to exclude, each of those Domains are still included but the 2nd step of the HomeKit Bridge config allows me to then select each of the entities I DON’T want to pass onto HomeKit.
This 2nd step is also quite difficult as it literally lists out each of the entities known to HomeKit, however long, and there’s no way to search through them or type-to-filter to aid in quickly selecting them. I have several hundred entities in my primary Home Assistant deployment which makes this very difficult. Furthermore, since I am using iBeacon monitoring, I have a bunch of useless entities that make the list long and burdensome to scroll through.
My Suggestions:
To keep the HomeKit Bridge config simple but to enhance the usability, I would suggest the following process improvements.
-
Change the inclusion/exclusion mode setting in the GUI’s first step to only impact the selected domains on the first step of the HomeKit integration config. AKA, a Domain Inclusion/Exclusion mode
- For example: If set to include, and only the domains light and climate are selected immediately afterwards, then when selecting the individual entities in the 2nd step, only entities of those two domain types are shown in the drop-down menu for selection.
- This means that when set to include, and no domains are selected, all domains are actually excluded by default. The inclusion/exclusion mode selected is understood quite literally this way, with the domain selection being dependent upon the inclusion mode selection.
- Likewise, if the same setting is set to exclude, then all domains are automatically included, except those that are selected for exclusion.
-
The 2nd step, (Entity selection) should always be dependent upon the domain inclusion/exclusion mode setting I suggested in number 1 above. In other words, show only the entities that have NOT been filtered out by the domain inclusion/exclusion in step 1 of the HomeKit bridge GUI config.
- Keeping my first example from number 1 above: If the domain inclusion mode is set to include only the domains light and climate, then step 2 of the HomeKit bridge GUI config will only list the entities that are classified as those two domains.
- I would suggest that all entities be included by default in step 2. However, users could select any of the individual entities that they want to exclude.
So basically, to sum this first bit up: I suggest changing the inclusion mode that currently only impacts the entity selection, to only impact the domain selection. Then make the entities available for selection in step 2 dependent upon the filters from step 1. This logic would be a lot simpler to configure and manage.
- Step 2 needs a better method of selecting individual entities. If you have only a handful of devices in HA, it’s pretty easy, but as I mentioned earlier, I’ve been running HA for years and I’ve a lot of devices in HA that are all pruned and active.
- At a minimum, add a type to search filter in the step 2 drop-down menu, so that individual entity IDs can be selected quicker.
- However, entities are already mapped “Areas” their associated devices are placed into. Why not provide a way to filter and browse through the available entities based on this information?