Add some documentation
This commit is contained in:
parent
81d8840c32
commit
0569c820a7
1 changed files with 28 additions and 1 deletions
29
README.md
29
README.md
|
|
@ -10,4 +10,31 @@
|
||||||
|
|
||||||
## Config
|
## Config
|
||||||
|
|
||||||
See `src/config.js`
|
See `src/config.js`.
|
||||||
|
|
||||||
|
The Config format consists out of two sections. Topics and Controls.
|
||||||
|
|
||||||
|
### Topics
|
||||||
|
|
||||||
|
The topics section defines the mqtt interfaces.
|
||||||
|
|
||||||
|
### Controls
|
||||||
|
|
||||||
|
The Controls define the UI Controls.
|
||||||
|
|
||||||
|
| Name | Type | Optional? | Default |
|
||||||
|
|-----------------|-------------------|------------|-----------------|
|
||||||
|
| type | "toggle" | "dropDown" | "slider" | No | / |
|
||||||
|
| text | string | No | / |
|
||||||
|
| topic | string | No | / |
|
||||||
|
| enableCondition | string => boolean | Yes | () => true |
|
||||||
|
| *Toggle Options* |
|
||||||
|
| on | string | Yes | "on" |
|
||||||
|
| off | string | Yes | "off" |
|
||||||
|
| toggled | string => boolean | Yes | x => x == "off" |
|
||||||
|
| *DropDown Options* |
|
||||||
|
| options | Map<string,*> | Yes | {} |
|
||||||
|
| *Slider Options* |
|
||||||
|
| min | number | Yes | 0 |
|
||||||
|
| max | number | Yes | 1 |
|
||||||
|
| step | number | Yes | 1 |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue