--- title: HomeKit Device description: Instructions for how to integrate your HomeKit devices within Home Assistant. ha_category: - Alarm - Binary sensor - Climate - Cover - Fan - Health - Hub - Humidifier - Light - Lock - Sensor - Switch ha_release: 0.68 ha_iot_class: Local Push ha_bluetooth: true ha_config_flow: true ha_codeowners: - '@Jc2k' - '@bdraco' ha_domain: homekit_controller ha_zeroconf: true ha_platforms: - alarm_control_panel - binary_sensor - button - camera - climate - cover - diagnostics - event - fan - humidifier - light - lock - media_player - number - select - sensor - switch ha_integration_type: integration --- The [HomeKit](https://developer.apple.com/apple-home/) Device integration allows you to connect accessories with the "Works with HomeKit" logo to Home Assistant. This integration should not be confused with the [HomeKit Bridge](/integrations/homekit/) integration, which allows you to control Home Assistant devices via HomeKit. # Adding a HomeKit device There are different methods to add a HomeKit device to Home Assistant: - [via Ethernet or Wi-Fi](#adding-a-homekit-device-via-ethernet-or-wi-fi) - [via Bluetooth](#adding-a-homekit-device-through-bluetooth) - [via Thread](#adding-a-homekit-device-through-thread) - [by using Home Assistant’s preferred Thread network](#adding-a-homekit-device-to-a-thread-network-via-home-assistant) - [by using Apple Thread border router](#adding-a-homekit-device-via-apple-thread-border-router) ## Adding a HomeKit device via Ethernet or Wi-Fi The HomeKit Device integration automatically detects HomeKit [compatible devices](#supported-devices) on your network when they are ready to pair. ### Prerequisites - If you do not have the [`default_config`](/integrations/default_config/) integration, add [`zeroconf`](/integrations/zeroconf/) to your {% term "`configuration.yaml`" %} file. - Find your HomeKit pairing code. The code is on the device itself, or on the packaging. If your device has a screen, it may be shown on screen. - There is no way to recover this if you do not have it. In this case, you will need to contact the manufacturer to see what options you have. - Make sure your device is powered up. - Make sure the device is on your network, but not paired with another HomeKit controller. Depending on the device, you need to follow a different set of steps: - If your device is not already in your network: Join the device to your network: - Follow the instructions of the manufacturer on how to join the device to the network - If the device is HomeKit only (for example the Koogeek LS1 light strip), pair it with the Apple Home app, then follow the next step. - If your device is in your network but is paired with an Apple device via HomeKit: **Remove** the device from the Apple Home app. - Otherwise you won't be able to pair it with Home Assistant. - **Explanation:** Adding the device to the Home app and then removing it again has two effects: - It adds the device to your network. It stays in the network even after you removed it from the app. - Removing the device from the app opens it up for pairing with Home Assistant's HomeKit Device integration directly. HomeKit devices can only be paired to a single controller at once. ### To add a HomeKit device via Ethernet or Wi-Fi 1. The device should have been discovered under **{% my integrations title="Settings > Devices & services" %}**. 2. On the HomeKit Device integration, select **Configure**.  3. Enter your HomeKit pairing code. - Add the device to a room and select **Finish**. - The device should now be added to your Home Assistant instance. 4. Once Home Assistant is configured to work with the device, you can export it back to Siri and Apple Home with the [`HomeKit Bridge`](/integrations/homekit/) integration. ## Adding a HomeKit device through Bluetooth You can add a HomeKit [compatible device](#supported-devices) to Home Assistant via [Bluetooth](/integrations/bluetooth). ### Prerequisites - Find your HomeKit pairing code. The code is on the device itself, or on the packaging. If your device has a screen, it may be shown on screen. - There is no way to recover this if you do not have it. In this case, you will need to contact the manufacturer to see what options you have. - If your Home Assistant instance does not natively support Bluetooth, use an ESPHome Bluetooth proxy. - A proxy can also be helpful if your Home Assistant device is too far away from the device you are trying to pair. - If your HomeKit device has been used with {% term Thread %} before, or is still paired with iOS, reset the device. - HomeKit devices can only be paired to a single controller at once. - If it has been in a {% term Thread %} network before, the device might remember the {% term Thread %} credentials of a different network. A reset makes sure the device is not connected to any {% term Thread %} network. ### To add a HomeKit device through Bluetooth 1. Power up your HomeKit device. - If you have Bluetooth enabled, the device should be discovered under **{% my integrations title="Settings > Devices & services" %}**. 2. On the HomeKit Bridge integration, select **Configure**.  3. To pair the device, enter the HomeKit pairing code. - To pair a battery-powered device, you may need to press a button on the device to wake it. - Bluetooth devices may take significantly longer to pair than IP devices. - Add the device to a room and **Finish**. ## Adding a HomeKit device through Thread This section shows the ways you can join a HomeKit device to a {% term Thread %} network: 1. via Home Assistant 2. via Apple Thread border router ### Adding a HomeKit device to a Thread network via Home Assistant There are two methods to add a HomeKit [compatible device](#supported-devices) to a {% term Thread %} network: - via Home Assistant's preferred {% term Thread %} network - via [Apple Thread border router](#adding-a-homekit-device-via-apple-thread-border-router) This section describes how to add it via Home Assistant's preferred {% term Thread %} network. #### Prerequisites - A HomeKit device which supports {% term Thread %}. This is indicated by the Thread label on the packaging. - Make sure the HomeKit device has been [joined using Bluetooth](#adding-a-homekit-device-through-bluetooth). - **Thread network**: In order to use HomeKit over Thread, you need a working border router. - Make sure your Home Assistant device is on the same network (LAN) as the border router. - Make sure the {% term Thread %} network you'd like to use is known by Home Assistant and marked as **Preferred network** in the {% term Thread %} configuration. - If you have a Home Assistant Yellow or Connect ZBT-1, you can enable Thread to set up an Open Thread border router and with that a {% term Thread %} network. - Documentation on [enabling Thread on Yellow](https://yellow.home-assistant.io/procedures/enable-thread/) - Documentation on [enabling Thread on Connect ZBT-1](https://connectzbt1.home-assistant.io/procedures/enable-thread/) #### To add a HomeKit device to a Thread network via Home Assistant 1. To open the device configuration page, on the **HomeKit** integration, select the **device**. 2. Under **Diagnostic**, you can see the **Thread Status** as **Disabled**.  3. To enable {% term Thread %}, under **Configuration**, select **Press**. This will provision the preferred Thread credentials. - The status has now changed: - Depending on the device type, the mesh size and health, the Thread status can be **Child**, **Router**, or **Leader**.  - That's it. Your HomeKit device now communicates via {% term Thread %}. ### Adding a HomeKit device via Apple Thread border router There are two methods to add a HomeKit [compatible device](#supported-devices) to a {% term Thread %} network: - via [Home Assistant's preferred Thread network](#adding-a-homekit-device-to-a-thread-network-via-home-assistant) - via Apple Thread border router This section describes how to add a HomeKit [compatible device](#supported-devices) using an Apple Thread border router device such as a HomePod mini. #### Prerequisites - An Apple device that can act as a Thread border router, such as a HomePod mini. - A HomeKit device which supports {% term Thread %}. This is indicated by the Thread label on the packaging. - Make sure your Home Assistant instance is on the same network (LAN) as the border router. - Make sure the HomeKit device has been paired in the Apple Home app (using the iOS Home app). #### To add a HomeKit device via Apple Thread border router 1. Remove the HomeKit device from the Apple Home app. Don't reset the device. - This leaves the {% term Thread %} network details on the HomeKit device. - The device will be automatically discovered by the HomeKit controller integration in Home Assistant. - It will appear as a discovered device over {% term Thread %}. 2. Under **{% my integrations title="Settings > Devices & services" %}**, on the HomeKit integration, select **Configure**.  3. To pair the device, enter the HomeKit pairing code. The code is on the device itself or the packaging. - To pair a battery-powered device, you may need to press a button on the device to wake it. - Bluetooth devices may take significantly longer to pair than IP devices. - Add the device to a room and **Finish**. 4. To open the device configuration page, on the **HomeKit** integration, select the **device**. 5. Under **Diagnostic**, check the status: - Depending on the device type, the mesh size and health, the Thread status can be **Child**, **Router**, or **Leader**.  - That's it. Your HomeKit device now communicates via {% term Thread %}. ## Supported devices There is currently support for the following device types (also called *domains*) within Home Assistant. They are listed with their default types. - Alarm control panel (HomeKit security system) - Climate (HomeKit thermostats and air conditioners) - Cover (HomeKit garage door openers, windows, or window coverings) - Light (HomeKit lights) - Lock (HomeKit lock) - Switch (HomeKit switches, outlets and valves) - Binary sensor (HomeKit motion, contact, occupancy, carbon monoxide and smoke sensors) - Sensor (HomeKit humidity, temperature, co2 and light level sensors) - Fan - Air quality - Humidifier (HomeKit humidifiers and dehumidifiers) - Automation triggers (HomeKit 'stateless' accessories like buttons, remotes and doorbells) {% note %} If your device is not on this list then you may still be able to pair it, and it will be visible in the Device Registry. But Home Assistant may not create entities for it. {% endnote %} The integration will enable push updates. Devices that connect through Wi-Fi or Ethernet may fall back to only polling if the connection is unstable. ## 'Stateless' switches and sensors Some HomeKit devices (like buttons, remotes and doorbells) don't have sensors that can be read like a normal HomeKit device - they only inform Home Assistant when something happens. This means Home Assistant can't show an entity for them, as they have no state. But they are available for use as [device automations](/integrations/device_automation/). For example, to add a new automation that is triggered by one of these devices go to the device registry UI and find the device you want to use as a trigger. Click on it to reveal the device registry entry for it. You will be able to see the devices model, manufacturer and firmware version. You might see related entities - like a battery sensor.