Skip to content

Commit

Permalink
Add config flow to One-Time Password (OTP) integration (home-assistan…
Browse files Browse the repository at this point in the history
  • Loading branch information
tr4nt0r authored Jun 20, 2024
1 parent 8e4e9fc commit 41bde93
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions source/_integrations/otp.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand Down

0 comments on commit 41bde93

Please sign in to comment.