- Generate OTP codes with a specified lifetime.
- Automatically delete expired or used OTPs.
- Display current active OTP codes and their expiry times.
- Integrate with Nuki Smart Lock API to manage access.
If you have HACS installed, you can easily add this repository as a custom integration:
- Open HACS in the Home Assistant frontend.
- Navigate to "Integrations" section.
- Click on the "..." button in the top right corner and select "Custom repositories".
- Add the URL of this repository.
- Choose "Integration" as the category and click "Add".
- You should now be able to search for and install the Nuki OTP integration directly through HACS.
To manually install this integration, follow these steps:
- Ensure you have a Home Assistant instance running.
- Download this repository and copy the
custom_components/nuki_otp
folder to thecustom_components
directory of your Home Assistant installation. - Restart Home Assistant to detect the new integration.
After installation, add the integration through the Home Assistant frontend:
- Navigate to
Configuration
->Integrations
. - Click on the
+ Add Integration
button. - Search for
Nuki OTP
and select it. - Enter the required configuration details:
- API Token
- API URL
- OTP Username
- Nuki Name
- OTP Lifetime Hours
Once configured, the integration will provide a sensor and a switch within Home Assistant:
- Sensor: Displays the currently active OTP and its expiry time.
- Switch: Allows generating a new OTP or deleting the current one.
If you encounter any issues, check the Home Assistant logs for errors and ensure your configuration details are correct. If problems persist, please report them on the GitHub repository.
This integration uses GitHub releases for version management in HACS. The version in manifest.json
is the source of truth.
-
Update version in
manifest.json
-
Stage and commit the change:
- Open the Source Control panel (Ctrl+Shift+G or Command+Shift+G)
- Stage the manifest.json change
- Enter commit message: "chore: bump version to X.Y.Z"
- Click the checkmark to commit
-
Push the changes:
- Click the sync button in VSCode
- Or use the Command Palette: "Git: Push"
The GitHub Action will automatically:
- Create a Git tag matching the version
- Create a GitHub release from the tag
- Make the release available in HACS
The automated release process:
- Monitors changes to
manifest.json
- When version changes, creates a tag if needed
- Creates a GitHub release if it doesn't exist
- HACS uses the release version for updates
This ensures the version in manifest.json
always matches the latest release.
This integration is released under the MIT License.
This integration is not officially affiliated with Nuki and is provided "as is" without warranty of any kind.