Update Otp sensor component configuration (#7119)

This commit is contained in:
Klaas Schoute 2018-10-26 13:17:57 +02:00 committed by Fabian Affolter
parent 7deb6d3e66
commit 59963a7a23

View File

@ -27,10 +27,17 @@ sensor:
token: SHARED_SECRET_TOKEN
```
Configuration variables:
- **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `OTP Sensor`.
- **token** (*Required*): The shared secret you use in your OTP generator (e.g., Google Authenticator on your phone)
{% 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 %}
## Generating a token
@ -48,6 +55,7 @@ To run in a Docker container:
$ docker exec -it home-assistant python -c 'import pyotp; print("Token:", pyotp.random_base32())'
Token: IHEDPEBEVA2WVHB7
```
Copy and paste the token into your Home Assistant configuration and add it to your OTP generator. Verify that they generate the same code.
<p class='note warning'>