Home Assistant’s Tuya integration supports every platform except lock, so my Tuya keypad showed up as a read-only binary sensor: no way to open the door and no way to manage access codes, which is what I needed for a small guesthouse. So I built it myself, on top of Tuya’s Smart Lock Open APIs.
Update, September 2026: this started as a Home Assistant app (what used to be called an add-on) and has now been rewritten as a proper HACS integration. It works on every install type (not just HA OS), needs no port and no MQTT, and answers service calls directly. The app’s repository (leanderdl2/tuya-lock-bridge) stays online for anyone using it, but new development happens in the integration.
GitHub: GitHub - leanderdl2/hass-tuya-lock-bridge: Home Assistant integration for Tuya smart locks: open the door, manage access codes and profiles, see who came in · GitHub
Install via HACS as a custom repository (a PR for the default store is pending).
What you get, per lock
buttonto open the doorsensorwith the codes valid right now (full list in its attributes)sensor+eventfor who opened the door, how (PIN, card, app) and when — trigger an automation on who came in- one
switchper profile: off disables its PINs and cards, on brings them back, nothing is deleted (think “the cleaner only on changeover days”) - a Locks page in the sidebar (admins only) to see codes, create and revoke them, open the door and manage profiles by hand
Services (actions) for everything else: temporary codes with a period, single-use, or a recurring daily pattern (“weekdays 11:00–15:00”); a book helper that turns a check-in, check-out and phone number into a code; profiles with permanent PINs; card enrolment (the lock goes into enrolment mode, you hold the card against the keypad); rename and delete. Services that create something answer with its id, so an automation can keep it.
Entity names follow your HA language; English and Dutch are included.
Prerequisites: a Cloud Development project on the Tuya IoT platform with your Tuya/Smart Life account linked, subscribed to the Smart Lock Open Service. The Trial Edition has a monthly call allowance and must be extended periodically; the integration polls every five minutes by default (configurable).
Hardware: developed and tested on a Nivian NV-ACCESS-PIN-RFID-W WiFi keypad (Tuya category mk). It should work with any Tuya lock exposing the same APIs; if you try it on another model, I’d like to hear how it went. Recurring daily patterns are the one thing Tuya documents as Zigbee-only, so test one before relying on it.
If all you need is open/close, also look at the xtend_tuya or tuya-smart-lock integrations on GitHub; this one is for when you also want codes, profiles and the unlock log.