Oh that's awesome — wish I'd seen this before some of the work I did! I ended up going down a similar path and built something that tackles it from a slightly different angle, happy to share.
The problem I kept running into: HA and HomeKit drift apart over time — different room names, different friendly names, and after any device swap or migration you don't always know which HomeKit UUID maps to which HA entity. When names don't match (or you have a rack of similar lights), there's no reliable way to correlate them without guessing.
What I built: ha-homekit-bridge-connect — a Textual TUI that lets you physically actuate a device once and automatically correlates the HA state change with the HomeKit accessory that responded. You don't have to trust that names align, you just touch the switch and it figures out the UUID. Confirmed matches persist, and then it applies room assignments and renames in gated dry-run-first steps — nothing writes until you explicitly confirm.
It goes through a HomeKit MCP proxy rather than native macOS APIs, so it runs on Linux. Still rough around the edges but the core matching works well.