diff --git a/source/_components/sensor.otp.markdown b/source/_components/sensor.otp.markdown index 2364e986398..5e753501752 100644 --- a/source/_components/sensor.otp.markdown +++ b/source/_components/sensor.otp.markdown @@ -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.