Add config flow to One-Time Password (OTP) integration (#33031)

This commit is contained in:
Mr. Bubbles 2024-06-20 10:03:57 +02:00 committed by GitHub
parent 8e4e9fcd2a
commit 41bde936f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,6 +10,7 @@ ha_quality_scale: internal
ha_domain: otp
ha_platforms:
- sensor
ha_config_flow: true
ha_integration_type: integration
related:
- docs: /docs/configuration/
@ -18,29 +19,7 @@ related:
The `otp` {% term integration %} generates One-Time Passwords according to [RFC6238](https://tools.ietf.org/html/rfc6238) that is compatible with most OTP generators available, including Google Authenticator. You can use this when building custom security solutions and want to use "rolling codes", that change every 30 seconds.
## Configuration
To enable the OTP {% term integration %}, add the following lines to your {% term "`configuration.yaml`" %} file.
{% include integrations/restart_ha_after_config_inclusion.md %}
```yaml
# Example configuration.yaml entry
sensor:
- platform: otp
token: SHARED_SECRET_TOKEN
```
{% configuration %}
name:
description: Name of the sensor to use in the frontend.
required: false
default: OTP Sensor
type: string
token:
description: The shared secret you use in your OTP generator (e.g., Google Authenticator on your phone).
required: true
type: string
{% endconfiguration %}
{% include integrations/config_flow.md %}
## Generating a token