Update tank_utility.markdown (#12568)

* Update tank_utility.markdown

Added instructions from the TankUtility API reference documents on how to obtain the Device ID as I could no longer see a link on the web page for usage reports.

* ✏️ Tweaks

* ✏️ Tweak

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Tony McDonald 2020-03-30 18:06:30 -05:00 committed by GitHub
parent fbb761d1ea
commit a8b97518b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,32 @@ Each item in the list of devices is a 24 character string. These values can be f
The device item value is the last segment of the URL path, e.g., the URL
[https://app.tankutility.com/#/reports/000000000000000000000000](https://app.tankutility.com/#/reports/000000000000000000000000) would indicate `000000000000000000000000` as a device value.
### Using TankUtility API to Obtain Device ID
1. Obtain your personal token:
```bash
curl --user <my_username>:<my_password> https://data.tankutility.com/api/getToken`
```
The JSON response structure should resemble:
```json
{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0MzgyMjQwODE0NjIsInYiOjAsImQiOnsidWleejoic2ltcGxlbG9naW46MzM1In0sImlhdCI6wwDIyMzk5NX0.kbYzxRtbGB2ke3IBgQTVMNQprHOWJZFgQQnPK6Wyas4"}
```
2. Receive the list of devices you have in your account:
```bash
curl https://data.tankutility.com/api/devices?token=<my_personal_token>
```
The JSON response structure should resemble:
```json
{"devices":["54df6a066667531535371367","54ff69057492666782350667"]}
```
## Configuration
To enable the component, add the following lines to your `configuration.yaml` file: