- 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.
Contributions to this project are welcome! Feel free to fork the repository and submit pull requests.
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.