mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 17:57:14 +00:00
Update Otp sensor component configuration (#7119)
This commit is contained in:
parent
7deb6d3e66
commit
59963a7a23
@ -27,10 +27,17 @@ sensor:
|
|||||||
token: SHARED_SECRET_TOKEN
|
token: SHARED_SECRET_TOKEN
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
name:
|
||||||
- **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `OTP Sensor`.
|
description: Name of the sensor to use in the frontend.
|
||||||
- **token** (*Required*): The shared secret you use in your OTP generator (e.g., Google Authenticator on your phone)
|
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
|
## 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())'
|
$ docker exec -it home-assistant python -c 'import pyotp; print("Token:", pyotp.random_base32())'
|
||||||
Token: IHEDPEBEVA2WVHB7
|
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.
|
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'>
|
<p class='note warning'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user