Welcome to HomeKitLab · a home lab that leans toward Apple Home · everyone is welcome, whatever you run at home · Ring cameras, go2rtc, and Home Assistant · best viewed in Netscape Navigator 4.0 at 800×600 ·

How to Add TP-Link Kasa Light Switches, Dimmers, and Camera Floodlights to Apple Home (Home Assistant HomeKit Bridge)

NEW!

The HS200 switches in this house have no HomeKit setup code, so the Home app cannot add them. The newer KS225 dimmer is Matter-certified, so it could join Apple Home on its own. Here everything goes through Home Assistant instead, so one bridge carries every light in the house to Apple Home, with the same names on the wall dashboard, in Siri, and in automations.

The same bridge picks up the two floodlights built into the Reolink cameras. Those are lights in Home Assistant, so they go to Apple Home with everything else.

The page is dressed like a 1998 personal site. The steps are current. Copy the YAML from the Notepad boxes.

What you need
  • Home Assistant on the same network as the switches. Discovery does not cross subnets.
  • Kasa switches already set up in the Kasa app. This house has three HS200 on/off switches and two KS225 dimmers.
  • Your TP-Link account sign-in, for models that need it.
  • Optional: Reolink cameras with floodlights already in Home Assistant. See the Reolink guide, and Ring and Reolink cameras together in Apple Home.
  • An Apple home hub, a HomePod or an Apple TV.

The TP-Link Smart Home integration is built in. Home Assistant usually discovers Kasa switches on the LAN by itself, so check Settings, Devices & services for them under Discovered and press Add on each one. If one is missing, Add Integration, TP-Link Smart Home, and enter its IP address.

Newer Kasa models need your TP-Link cloud username and password to unlock local control. In Home Assistant's list the KS225 always does, and newer HS200 hardware versions do. Home Assistant asks during setup and keeps a hash, then talks to the switch over the LAN.

  • HS200: on/off switch. Comes in as switch.*.
  • KS225: dimmer. Comes in as light.* with brightness.

Give the switches fixed addresses in your router's DHCP. Home Assistant reaches each switch by IP, and a moved address looks like a dead switch.

A Home Assistant discovery window listing Home Office HS200, Balcony Deck HS200, Front Door HS200, Master Bedroom KS225, and Living Room Dimmer KS225, with a masked TP-Link password field.
Five Kasa devices on the LAN. The KS225 dimmers ask for the TP-Link sign-in.

2 Give every light a Home-friendly name

The HomeKit Bridge takes each accessory's name from Home Assistant when you pair, and Siri uses that name. Set short names now. Here they are in customize.yaml:

customize.yaml
switch.home_office:
  friendly_name: Office
switch.balcony_deck:
  friendly_name: Balcony Lights
switch.front_door:
  friendly_name: Front Door Light
light.master_bedroom:
  friendly_name: Master Bedroom
light.living_room_dimmer:
  friendly_name: Living Room Dimmer
light.outside_backyard_camera_floodlight:
  friendly_name: Backyard Floodlight
light.outside_front_camera_floodlight:
  friendly_name: Driveway Floodlight

Renaming each entity in the UI does the same job. Renaming a device in Apple Home later only changes Apple Home.

A Notepad style window mapping switch.home_office to Office, switch.balcony_deck to Balcony Lights, switch.front_door to Front Door Light, light.master_bedroom to Master Bedroom, and light.living_room_dimmer to Living Room Dimmer.
Names first. The HomeKit Bridge copies them when you pair.

3 Add the camera floodlights

The Reolink integration gives each floodlight camera a light entity named Floodlight, plus a floodlight mode select and a brightness number. Only the light itself goes to Apple Home. Here they are light.outside_backyard_camera_floodlight and light.outside_front_camera_floodlight.

The cameras themselves are on a different bridge in accessory mode, because HomeKit wants one camera per accessory. The floodlights are ordinary lights, so they share the lights bridge.

A window showing light.outside_backyard_camera_floodlight named Backyard Floodlight and light.outside_front_camera_floodlight named Driveway Floodlight, both from the Reolink integration.
The floodlights come from the Reolink integration, not TP-Link.
A real crop of the Home Assistant wall dashboard: an Outside group with Backyard Floodlight and Driveway Floodlight tiles, both Off.
The two camera floodlights on the wall dashboard, the same entities that go to Apple Home.

4 One HomeKit Bridge for the lights

Settings, Devices & services, Add Integration, HomeKit Bridge. Pick the light and switch domains, finish, then open Configure on the new entry:

  • Mode: bridge.
  • Inclusion mode: include, and pick exactly the seven entities above. Including the whole switch domain would also send every LED and auto-update switch the Kasa integration creates.

This entry came up as HASS Bridge:21064. Its device was renamed Lights and Switches. As YAML, the same bridge reads:

configuration.yaml
homekit:
  - name: Lights and Switches
    port: 21064
    advertise_ip: 192.168.1.50   # your server's LAN IP
    filter:
      include_entities:
        - switch.home_office
        - switch.balcony_deck
        - switch.front_door
        - light.master_bedroom
        - light.living_room_dimmer
        - light.outside_backyard_camera_floodlight
        - light.outside_front_camera_floodlight

Pick UI or YAML for a bridge and stay with it. YAML for a UI-made bridge gives you a second bridge.

A HomeKit Bridge window named Lights and Switches: bridge mode, port 21064, advertise_ip 192.168.1.50, 3 switch entities and 4 light entities.
Seven entities, one bridge. The IP is a placeholder.

5 Pair it in the Apple Home app

Use the QR code in the Home Assistant notification. In the Home app choose Add Accessory, scan it, choose Add Anyway, and put each light in its room.

pairing.txt
Open the Apple Home app
Add Accessory
Scan the QR code from the Home Assistant notification
Add Anyway (uncertified accessory)
Pick a room for each of the 7 accessories
Done

The KS225 dimmers and the floodlights arrive as lights with on/off and brightness. The HS200 switches arrive as switches. In the Home app's accessory settings you can tell Home that a switch runs a light, if you want them grouped with the lights.

An Apple Home style window with tiles for Office, Balcony Lights, Front Door Light, Master Bedroom, Living Room Dimmer, Backyard Floodlight, and Driveway Floodlight.
Illustration, not a screenshot. Dimmers get a brightness slider, switches are on and off.

6 Troubleshooting

A switch is not discovered

Discovery only works on the same subnet. If the switches sit on an IoT VLAN, add each one by IP address and give it a fixed DHCP lease.

Authentication or communication errors

Turn on Third-Party Compatibility in the Kasa app, under Settings. Home Assistant's TP-Link docs list it as the first fix. If a KS225 still fails, check the TP-Link sign-in in the integration.

A switch shows up as a switch, not a light

HomeKit follows the Home Assistant domain. An HS200 is a switch entity, so it is a switch in Home. Change the accessory type in the Home app, or wrap it with a Switch as X helper (Light) and expose the helper instead.

A troubleshooting window with three rows: not discovered, add by IP; authentication error, enable third-party compatibility; wrong tile type, it follows the entity domain.
The three things that come up most.

Back to the guides Home

Comments

Loading comments…