How to Add TP-Link Kasa Light Switches, Dimmers, and Camera Floodlights to Apple Home (Home Assistant HomeKit Bridge)
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.
1 Add the TP-Link Smart Home integration
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.
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:
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.
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.
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
switchdomain 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:
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.
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.
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.
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.
Comments
Loading comments…