File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,17 @@ Configuration variables:
34
34
A simple way to generate a `token` for a new sensor is to run this snippet of python code in your Home Assistant virtual environment :
35
35
36
36
` ` ` shell
37
- $ pip install pyotp
38
- $ python -c 'import pyotp; print("Token: " + pyotp.random_base32())'
37
+ $ pip3 install pyotp
38
+ $ python3 -c 'import pyotp; print("Token:", pyotp.random_base32())'
39
39
Token: IHEDPEBEVA2WVHB7
40
40
` ` `
41
41
42
+ To run in a Docker container :
43
+
44
+ ` ` ` shell
45
+ $ docker exec -it home-assistant python -c 'import pyotp; print("Token:", pyotp.random_base32())'
46
+ Token: IHEDPEBEVA2WVHB7
47
+ ` ` `
42
48
Copy and paste the token into your Home Assistant configuration and add it to your OTP generator. Verify that they generate the same code.
43
49
44
50
<p class='note warning'>
You can’t perform that action at this time.
0 commit comments