A Home Assistant custom integration that automatically synchronizes your Home Assistant Areas with HomeKit Room assignments.
The HomeKit Bridge configuration in Home Assistant has no concept of filtering entities by Area.
You can filter by domains (lights, switches, fans, etc.) and use wildcards, but this approach is opinionated and becomes a maintenance headache over time. Every time you add a new device, you have to think about whether it matches your existing filters.
The problem: You organize your smart home by rooms (Areas) in Home Assistant, but HomeKit Bridge forces you to think in terms of entity types and naming patterns. This disconnect makes configuration fragile and tedious to maintain.
The solution: HomeKit Room Sync bridges this gap. Organize your devices into Areas in Home Assistant, and this integration automatically syncs those room assignments to your HomeKit bridges. Add a device to an Area once, and it syncs to your Homekit Bridge.
- Open HACS in your Home Assistant instance
- Click on "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add this repository URL:
https://github.com/lcrostarosa/homekit-room-sync - Select category: "Integration"
- Click "Add"
- Search for "HomeKit Room Sync" and install it
- Restart Home Assistant
- Download the
custom_components/homekit_room_syncfolder from this repository - Copy it to your Home Assistant
config/custom_components/directory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click + Add Integration
- Search for "HomeKit Room Sync"
- Select one or more HomeKit Bridges from the list (friendly names are displayed)
- Choose the Home Assistant Areas to include and optionally add manual include/exclude entity overrides
- Click Submit
Select the HomeKit Bridge you want to sync
Once configured, the integration works automatically in the background.
- Assign Areas in Home Assistant: Go to Settings > Devices & Services > Entities and assign an Area to your entities (e.g., assign a Light to "Living Room").
- Wait for Sync: The integration monitors these changes. After a short delay (debounced), it updates the HomeKit configuration.
- Check Apple Home: Open the Home app on your iOS device. The device should now be in the corresponding Room in HomeKit.
Devices automatically assigned to the correct room in Apple Home
| Option | Description |
|---|---|
| HomeKit Bridges | One or more HomeKit Bridge entries to manage (friendly names shown) |
| Areas | Limit syncing to entities assigned to the selected Home Assistant Areas |
| Include entity overrides | Always expose these entities, even if they are not in the allowed Areas |
| Exclude entity overrides | Never expose these entities, even if they would otherwise match |
You can manage multiple HomeKit bridges inside a single HomeKit Room Sync entry. Each bridge gets its own Area filters and include/exclude overrides. If you prefer to keep things isolated you can still add additional HomeKit Room Sync entries.
┌─────────────────────────────────────────────────────────────────┐
│ Home Assistant │
│ │
│ ┌──────────────┐ ┌─────────────────────────┐ │
│ │ Entity/Area │───▶│ HomeKit Room Sync │ │
│ │ Registry │ │ (Listens for changes) │ │
│ └──────────────┘ └───────────┬─────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │ HomeKit Config Entries │ │
│ │ (filter & entity_config)│ │
│ └───────────┬─────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │ homekit.reload service │ │
│ │ (Applies changes) │ │
│ └───────────┬─────────────┘ │
│ │ │
└──────────────────────────────────┼──────────────────────────────┘
│
▼
┌─────────────────────┐
│ Apple HomeKit │
│ (Updated rooms) │
└─────────────────────┘
For each entity, the room is determined in the following order:
- Entity's direct area: If the entity has an area assigned directly
- Device's area: If the entity's parent device has an area assigned
- No change: If neither area is available, the room assignment is left as-is
- Uses the official Home Assistant config-entry API (no direct
.storageediting) - Requires Home Assistant 2025.12.1 or newer so the HomeKit integration understands per-entry filters
- Each sync triggers a HomeKit reload for the affected bridge
- Home Assistant 2025.12.1 or newer
- Changes may take a few seconds to appear in the Apple Home app after sync
- Some HomeKit apps may cache room assignments; force-close and reopen the app if changes don't appear
- Exposure is controlled by the HomeKit Bridge integration (include domains/areas). Room alignment still requires writing per-entity
entity_configdata; HomeKit does not auto-map HA areas to rooms on its own.
- Check that the HomeKit Bridge integration is set up and running
- Verify that entities are exposed to HomeKit
- Check the Home Assistant logs for error messages
- Wait a few seconds for the sync to complete
- Force-close the Apple Home app and reopen it
- Try removing and re-adding the bridge in Apple Home (last resort)
Add this to your configuration.yaml:
logger:
default: info
logs:
custom_components.homekit_room_sync: debug# Clone the repository
git clone https://github.com/lcrostarosa/homekit-room-sync.git
cd homekit-room-sync
# Install dependencies with Poetry
poetry install
# Run linting
poetry run ruff check .
# Run type checking
poetry run mypy custom_components/homekit_room_syncFor quick development iteration, you can deploy directly to your Home Assistant server using the included deploy script.
# Deploy to a specific host
make deploy HOST=192.168.1.100
# Or use the script directly
./scripts/deploy.sh homeassistant.localCreate a .env file for persistent configuration:
# Copy the example file
cp env.example .env
# Edit with your settings
nano .envExample .env configuration:
HA_HOST=192.168.1.100
HA_USER=root
HA_SSH_PORT=22
HA_CONFIG_PATH=/config
HA_RESTART=falseThen simply run:
make deploy./scripts/deploy.sh [OPTIONS] [HOST]
Options:
-h, --help Show help message
-u, --user USER SSH user (default: root)
-p, --port PORT SSH port (default: 22)
-c, --config PATH HA config directory (default: /config)
-r, --restart Restart Home Assistant after deployment
--dry-run Show what would be done without executing| Installation Type | Config Path |
|---|---|
| HAOS / Docker | /config |
| Supervised | /usr/share/hassio/homeassistant |
| Core (venv) | /home/homeassistant/.homeassistant |
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Home Assistant for the amazing home automation platform
- HACS for making custom integration distribution easy