mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +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
|
||||
```
|
||||
|
||||
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'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user