UniFi Protect Doorbell: Unlock Smart Lock via Fingerprint (with Reboot Safety Check)

This blueprint unlocks a smart lock when an authorized fingerprint is identified on a UniFi Protect Doorbell Pro, with built-in protection against false triggers when the doorbell restarts.


:rocket: How to Import

Method 1: My Home Assistant (One-Click)

Click the badge below to open your Home Assistant instance with the blueprint pre-filled:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Method 2: Manual Import via URL

  1. In Home Assistant, navigate to Settings > Automations & Scenes > Blueprints.
  2. Click Import Blueprint (bottom right).
  3. Paste the following URL into the dialog:
    https://github.com/epiech/ha-blueprints/blob/main/blueprints/automation/unifi/fingerprint_unlock/unifi_protect_fingerprint_unlock.yaml
    
  4. Click Preview Blueprint, then click Import Blueprint.

:bullseye: Why this blueprint?

Many automations triggering off the UniFi Protect fingerprint reader suffer from a common issue: when the doorbell reboots or the Protect integration reconnects, Home Assistant re-broadcasts the last event state, which can unintentionally unlock the door.

This blueprint includes a 10-second freshness check ensuring the physical scan actually happened right now before sending the unlock command.

:sparkles: Features

  • Anti-Reboot Safety Check: Discards stale/cached events on doorbell restart or network reconnection.
  • Universal Lock Support: Works with any Home Assistant smart lock (lock.*).
  • User-Identified Notifications: Optionally sends push notifications showing who unlocked the door (e.g. “Door unlocked by John”).
  • Custom Actions Hook: Optionally trigger extra actions upon unlocking (turn on hallway lights, disarm an alarm, or chime).

:clipboard: Requirements

  • UniFi G4 Doorbell Pro (Wi-Fi or PoE) with fingerprint hardware.
  • Official UniFi Protect Integration.
  • Any smart lock integrated into Home Assistant.

:gear: Inputs

  • Fingerprint Sensor Entity: The event.<doorbell>_fingerprint entity.
  • Smart Lock: Your target lock.* entity.
  • Mobile App Notification (Optional): Mobile devices to notify.
  • Additional Actions (Optional): Extra services or scripts to run on unlock.

GitHub Source: epiech/ha-blueprints

I found the anti reboot safety check in the example provided in the Unifi Protect Integration to be reliable. AND it does not depend on a timer.

@eric.piech Does it have ulp_id: ? or does it trigger as anyone placeses their finger on the sensor?

Number 3 in FAQ.

Then its a pretty good blueprint! Do you mind adding nfc to this also?

:megaphone: !!!UPDATE!!! :megaphone:

:door: UniFi Protect Doorbell: Unlock Smart Lock via Fingerprint or NFC

This blueprint unlocks a smart lock when an authorized fingerprint is identified or an approved NFC card/fob is scanned on a UniFi Protect Doorbell Pro, with built-in protection against false triggers when the doorbell restarts or reconnects.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.


:rocket: How to Import

Method 1: My Home Assistant (One-Click)

Click the badge above to open your Home Assistant instance with the blueprint pre-filled.

Method 2: Manual Import via URL

  1. In Home Assistant, navigate to Settings > Automations & Scenes > Blueprints.

  2. Click Import Blueprint (bottom right).

  3. Paste the following URL into the dialog:

    https://github.com/epiech/ha-blueprints/blob/main/blueprints/automation/unifi/fingerprint_unlock/unifi_protect_fingerprint_unlock.yaml```
    
    
  4. Click Preview Blueprint, then click Import Blueprint.


:light_bulb: Why this blueprint?

Many automations triggering off the UniFi Protect fingerprint or NFC reader suffer from a common issue: when the doorbell reboots, updates firmware, or drops Wi-Fi, the integration restores and re-broadcasts the last-known event state, which can unintentionally unlock the door.

Furthermore, the doorbell triggers an event for any NFC card (or phone) that touches it, regardless of whether it was authorized.

This blueprint solves both problems by:

  • Enforcing Replay & Freshness Guards: It ignores transitions from unavailable/unknown/restored states, confirms the state timestamp actually changed, and ensures the physical scan occurred within the last 10 seconds.
  • Strict NFC Whitelisting: Matches scanned NFC card UIDs against a list of approved IDs, automatically normalizing case, colons, and spaces (e.g., 04:12:ab:cd matches ABCDEF1234).
  • Biometric Validation: Confirms that fingerprint scans are marked identified and contain an enrolled user_id before sending the unlock command.

:warning: Security Reminder: Standard NFC card UIDs (serial numbers) can be cloned or emulated using common tools (e.g., Flipper Zero, Proxmark, or certain phones). Only authorize tags and fobs you physically control and verify.


:sparkles: Features

  • Dual Access (Fingerprint & NFC): Unlock using fingerprints, authorized NFC tags, or both.
  • Independent Toggles: Easily enable or disable fingerprint or NFC unlocks with a toggle.
  • Anti-Reboot Safety Check: Discards stale/cached events on doorbell restart or network reconnection.
  • Flexible NFC UID Whitelist: Case-insensitive and colon/space agnostic (e.g., ABCDEF1234 or 04:12:ab:cd).
  • Universal Lock Support: Works with any Home Assistant smart lock (lock.*).
  • Context-Aware Notifications: Sends push notifications indicating who unlocked the door (e.g., “Door unlocked via fingerprint (John)” or “Door unlocked via NFC card (ID: ABCDEF1234)”).
  • Custom Actions Hook: Optionally trigger extra actions upon unlocking (turn on hallway lights, disarm an alarm, or play a chime).

:clipboard: Requirements

  • UniFi G4 Doorbell Pro (Wi-Fi or PoE) or G5 Doorbell Pro with fingerprint & NFC hardware.
  • Official UniFi Protect Integration.
  • Any smart lock integrated into Home Assistant (lock.*).

:gear: Inputs

Input Description Required
Fingerprint Sensor Entity The event.<doorbell>_fingerprint entity Yes
Enable Fingerprint Unlock Toggle fingerprint unlocking on or off Default: true
NFC Sensor Entity The event.<doorbell>_nfc entity Yes
Enable NFC Unlock Toggle NFC unlocking on or off Default: true
Authorized NFC Card IDs List of card/tag UIDs allowed to unlock (e.g. ABCDEF1234) Optional (Required for NFC)
Smart Lock Target lock.* entity to unlock Yes
Mobile App Notification Mobile devices to receive push notifications Optional
Additional Actions Extra services, chimes, or scripts to run on unlock Optional

I added NFC as you requested.