From 59963a7a23dd3f4ec5be0b0bf0444c62764716bd Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Fri, 26 Oct 2018 13:17:57 +0200 Subject: [PATCH] Update Otp sensor component configuration (#7119) --- source/_components/sensor.otp.markdown | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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.