Adding a smart lock to Home Assistant gives you local, instant control — lock status updates in under a second, automations fire reliably, and nothing routes through a manufacturer cloud. This guide covers the complete setup process for Z-Wave smart locks.
Prerequisites
- Home Assistant running on a Raspberry Pi 4, mini PC, or similar hardware
- A Z-Wave USB coordinator (for Z-Wave locks)
- Z-Wave JS integration configured in Home Assistant
- A compatible smart lock (see our Smart Locks Without Subscriptions guide)
Step 1: Install Your Z-Wave Coordinator
Plug the USB coordinator into your Home Assistant host. Navigate to Settings → Hardware to verify the USB device is detected. Install the Z-Wave JS UI add-on from the add-on store.
Step 2: Include the Lock in Your Z-Wave Network
Smart locks use Z-Wave Security S2. The inclusion process requires a security handshake.
- In Z-Wave JS UI, click Add Node → Secure Add
- Enter the 5-digit DSK code found on the back of the lock or in the manual
- Put the lock in inclusion mode — typically triple-clicking the button inside the battery compartment
- The inclusion process takes 15–30 seconds. The lock will beep to confirm.
Important: Perform inclusion with the lock close to your Z-Wave coordinator — within 3 meters if possible. Move the lock to its final location after successful inclusion.
Step 3: Verify the Lock in Home Assistant
After inclusion, navigate to Settings → Integrations → Z-Wave JS. Your lock should appear as a new device with these entities: lock.your_lock_name (main lock entity), binary_sensor.your_lock_name_door (door open/closed), and sensor.your_lock_name_battery (battery percentage).
Step 4: Add Access Codes via Home Assistant
The Lock Code Manager integration (available via HACS) provides a clean interface for managing access codes. Install HACS, then Lock Code Manager, and navigate to the interface to add codes with names and optionally restrict them to specific days and times.
Example: Create a “Dog Walker” code that only works Monday–Friday between 11am and 2pm. Create a “Guest” code that expires automatically after your guest stay.
Step 5: Create Lock Automations
Auto-Lock After 10 Minutes: Trigger when lock state changes to unlocked, delay 10 minutes, condition that lock is still unlocked, action to lock the door.
Notify When Door Unlocked After 10pm: Trigger on unlock, condition time is between 10pm and 7am, action to send notification to phone.
Welcome Home: Trigger when lock is unlocked via code slot 1, action to turn on entry lights, disarm alarm, run welcome scene.
Troubleshooting Common Issues
Lock not responding: Z-Wave locks are battery-powered and use a sleep mode to conserve battery. Command response may take 5–10 seconds if the lock is in sleep mode. This is normal.
Lock included without S2 security: Remove and re-include with Secure Add. S2 encryption is important for locks — do not skip it.
Range issues: Locks are often near exterior walls. Add a Z-Wave range extender between the hub and lock if commands are unreliable.