Add support for other miio device tokens (#14036)

Add details on how to retrieve token from sqlite db for other miio devices such as powerstrip and plug.

This page is currently linked to from :https://www.home-assistant.io/integrations/switch.xiaomi_miio and does not contain specifc information for powerstrip or plugs.
This commit is contained in:
Kanishka Samarasinghe 2020-07-21 00:29:50 +10:00 committed by GitHub
parent 6d2cd28a6f
commit f0e0d190ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,10 +329,18 @@ This token (32 hexadecimal characters) is required for the Xiaomi Mi Robot Vacuu
8. Install [DB Browser for SQLite](https://sqlitebrowser.org/).
9. Open DB Browser and load the `.sqlite` file you saved from your backup.
10. Click on the `Execute SQL` tab.
11. Input and run this query:
11. Input and run this query (use appropriate SELECT query for your device i.e. Vacuum, Powerstrip or Plug):
```sql
-- Execute to retrieve token for Vacuum
SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%vacuum%"
-- Execute to retrieve token for Smart Powerstrip
SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%powerstrip%"
-- Execute to retrieve token for Smart Plug
SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%plug%"
```
12. Copy the returned 96-digit hexadecimal string to your clipboard.