-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfig.schema.json
230 lines (230 loc) · 6.94 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
{
"pluginAlias": "SwitchBot",
"pluginType": "platform",
"singular": true,
"headerDisplay": "<p align='center'><img width='100px' src='https://user-images.githubusercontent.com/9875439/102681754-ac2eb800-4189-11eb-8e17-7c47c804484b.png'></p>\n\nThe **SwitchBot** plugin allows you to control SwitchBot Devices. \n\nTo get started link your SwtichBot account.\nTo get started link your SwtichBot account.\n\n1. Download SwitchBot App on App Store or Google Play Store.\n\n2. Register a SwitchBot account and log in into your account.\n\n3. Generate an Open Token within the App.\n\n4. Input your `Open Token` into the paramter below.",
"footerDisplay": "Please raise any issues on our [project page](https://github.com/OpenWonderLabs/homebridge-switchbot-openapi/issues).\n\nIf you would like to have other SwitchBot Devices added to this plugin fill out [Feature Request Form](https://github.com/OpenWonderLabs/homebridge-switchbot-openapi/issues/new?assignees=&labels=&template=feature_request.md).\n\n[SwitchBot Website](https://www.switch-bot.com)",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"default": "SwitchBot",
"required": true
},
"credentials": {
"type": "object",
"properties": {
"openToken": {
"title": "Token",
"type": "string",
"required": true
},
"notice": {
"title": "Notice",
"type": "string",
"required": true,
"default": "Keep your token a secret!"
}
}
},
"options": {
"type": "object",
"properties": {
"refreshRate": {
"title": "Refresh Rate",
"type": "number",
"minimum": 120,
"placeholder": 300,
"description": "Indicates the number of seconds between polls of SwitchBot API."
},
"hide_device": {
"title": "Hide Device",
"type": "array",
"items": {
"type": "string"
}
},
"bot": {
"type": "object",
"properties": {
"device_switch": {
"title": "Switch Mode Bots",
"type": "array",
"items": {
"type": "string"
}
},
"device_press": {
"title": "Press Mode Bots",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"humidifier": {
"type": "object",
"properties": {
"hide_temperature": {
"title": "Hide Humidifier's Temperature Sensor",
"type": "boolean"
}
}
},
"curtain": {
"type": "object",
"properties": {
"set_minStep": {
"title": "Set Min Step",
"type": "number",
"placeholder": "1"
},
"set_min": {
"title": "Set Min",
"type": "number",
"placeholder": "0"
},
"set_max": {
"title": "Set Max",
"type": "number",
"placeholder": "100"
}
}
}
}
},
"devicediscovery": {
"name": "Device Discovery",
"type": "boolean"
}
}
},
"layout": [
{
"type": "fieldset",
"title": "SwitchBot Account Info",
"expandable": true,
"expanded": false,
"items": [
"name",
"credentials.openToken"
]
},
{
"type": "fieldset",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
{
"type": "help",
"helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between polls of SwitchBot API.</em>"
},
{
"key": "options.refreshRate",
"notitle": true
},
{
"type": "help",
"helpvalue": "<h5>Hide Device</h5><em class='primary-text'>Hide Device allows you to hide a device using it's deviceID.</em>"
},
{
"key": "options.hide_device",
"notitle": true,
"add": "Add Another Device",
"type": "array",
"items": [
{
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [
{
"key": "options.hide_device[]",
"placeholder": "81F3UT59513F"
}
]
}
]
},
{
"type": "fieldset",
"title": "Bot Settings",
"expandable": true,
"expanded": false,
"items": [
{
"key": "options.bot.device_switch",
"notitle": false,
"add": "Add Another Bot in Switch Mode",
"type": "array",
"items": [
{
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [
{
"key": "options.bot.device_switch[]",
"placeholder": "81F3UT59513F"
}
]
}
]
},
{
"key": "options.bot.device_press",
"notitle": false,
"add": "Add Another Bot in Press Mode",
"type": "array",
"items": [
{
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [
{
"key": "options.bot.device_press[]",
"placeholder": "81F3UT59513F"
}
]
}
]
}
]
},
{
"type": "fieldset",
"title": "Humidifier Settings",
"expandable": true,
"expanded": false,
"items": [
"options.humidifier.hide_temperature"
]
},
{
"type": "fieldset",
"title": "Curtain Settings",
"expandable": true,
"expanded": false,
"items": [
"options.curtain.set_minStep",
"options.curtain.set_min",
"options.curtain.set_max"
]
},
{
"type": "help",
"helpvalue": "<h5>Device Discovery</h5><em class='primary-text'>Enables Device Info Logging.</em>"
},
{
"key": "devicediscovery",
"title": "Device Discovery"
}
]
}
]
}