Add input/output example to readme
This commit is contained in:
parent
138234c4a3
commit
45384b2a62
1 changed files with 54 additions and 0 deletions
54
README.md
54
README.md
|
@ -28,6 +28,60 @@ currently open), you can replace parts of the JSON document (anything
|
|||
except object keys) with [Jinja2 templates][jinja], from which you can
|
||||
invoke custom plugins, which look up and return your dynamic content.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Input</td>
|
||||
<td>Output</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
```json
|
||||
{
|
||||
"api": "0.13",
|
||||
"space": "My Hackerspace",
|
||||
"state": "{{ space_state() }}",
|
||||
"sensors": {
|
||||
"network_connections": "{{ network_connections() }}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
```json
|
||||
{
|
||||
"api": "0.13",
|
||||
"state": {
|
||||
"open": true,
|
||||
"lastchange": 1575160777,
|
||||
"message": "Visitors Welcome!"
|
||||
},
|
||||
"sensors": {
|
||||
"network_connections": [
|
||||
{
|
||||
"value": 4,
|
||||
"type": "wifi",
|
||||
"name": "2.4 GHz"
|
||||
},
|
||||
{
|
||||
"value": 7,
|
||||
"type": "wifi",
|
||||
"name": "5 GHz"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Usage
|
||||
|
||||
### 0. Download
|
||||
|
|
Loading…
Reference in a new issue