In this guide, I’m going to show you how to add a “child lock” into the Keymaster integration. Keymaster is a HACS integration that lets you create and manage door access pin codes from within Home Assistant.
A “child” lock is basically a lock that uses the exact same pin codes as the your “parent” lock. Since I already have my “frontdoor” setup with pin codes in Keymaster, I’m choosing that as my parent lock so my wife and kids don’t need to remember two sets of codes.
The two smart locks I am using is the Schlage BE469 and the Kwikset 888. I have Home Assistant install guides for of these of locks and both work flawlessly.
- https://smarthomepursuits.com/add-kwikset-888-to-home-assistant/
- https://smarthomepursuits.com/add-schlage-zwave-to-home-assistant/
- https://smarthomepursuits.com/how-to-install-keymaster-to-manage-z-wave-lock-pins-in-home-assistant/
Let’s get started!
Step 1: Add a 2nd Keymaster Integration
For this to work, you need to add two separate Keymaster integrations. Here is my Add Keymaster to Home Assistant guide, if you need to reference it.
You are welcome to manage each lock independently, each with their own set of lock codes, or just mirror the lock names and codes from your first door. However, since we want to make use of the “child locks” functionality to sync both doors together, follow along below. This will allow you to set/change pins in your parent door and it’ll automatically update the second one.
If you’ve already got both added, you can just click the 2nd lock to edit it:
If you don’t have two locks added to Keymaster, go to Configuration > Integrations. Click the + Add Integration and search for keymaster.
Then, click click Configure. Under the settings, change the “Select Parent Lock” field to your parent/primary lock. If you have 5 code slots in your parent lock, choose 5 codes for this one as well.
Since this lock is on my Patio Door, I’m giving it the name ‘patiodoor’. Do not include spaces or capital letters in the name.
If all goes well, you should see a message like this:
Then, reboot Home Assistant.
Step 2: Add Lovelace YAML
Under File Editor > packages > keymaster, you should now see two folders:
Click into your 2nd lock (i.e. – my patiodoor) and find the patiodoor_lovelace
file. Open it.
Then, press CTRL+A to copy everything to clipboard.
Then, head over to your main Lovelace dashboard. In the top right corner, click the 3 dots > Edit Dashboard > Raw Configuration Editor.
Paste the copied code at the very bottom.
You should now see a 2nd view in Lovelace.
If you click into the new view, chances are that all the user codes are blank. I’m not sure if this is a bug or not, but here’s how to sync things up.
Step 3: Sync Lock Codes with Parent Lock
Like I said, I’m not sure if this is a bug or expected behavior, but initially the codes in the second view will all be empty. It’ll look like it hasn’t synced up at all. Entering parent codes on the 2nd door don’t work, either.
This may be fixed or updated in future versions, but the fix for now is to simply manually add all the lock names and codes to the 2nd view. Then, toggle Enabled on.
You only need to do this once! After you manually add the lock names and pins to the 2nd view this very first time, any future pin code changes can be done from the parent lock view and you’ll see it successfully sync up with your second door.
Step 4: Test it out!
Now, head over to your 2nd door. Enter one of your parent lock codes – it should successfully unlock the door.
As a secondary test, change one of your parent lock pin codes from your “parent” view. Then, click your child view to ensure it synced up. Then, test out the newly changed pin code on the second door.
(Optional) Step 5: Fix Pin Status “Adding” bug
There seems to be a bug with Slot 1, where it constantly shows “Adding”, even though the codes sync up correctly. You can either ignore that as it still syncs up pin code changes and wait for an Keymaster update, or, manually clear the lock code.
Go to Developer Tools > Services. Paste in this code below, changing out the code_slot
number and entity_id
with the problematic one. Then, toggle Enabled off and back on. I’ve done this myself and confirmed it fixes it.
service: zwave_js.clear_lock_usercode
data:
code_slot: '1'
target:
entity_id: lock.touchscreen_deadbolt
Wrapping Up
If all goes well, you should now be able to edit and manage pin codes from your parent door using the Keymaster child locks feature within Home Assistant!
You can also follow this guide to configure Keymaster notifications to see who unlocked a door.
My Favorite Home Assistant Devices
Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.
- Zwave/Zigbee hub: Nortek GoControl HUSBZB-1
- Smart Plugs: Sonoff S31 Lite Zigbee
- Motion Sensors: Hue Indoor Motion
- Outdoor Camera: Amcrest IP5M Turret
- Robot Vacuum: Roborock S7
The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.