@homebridge-plugins/homebridge-govee 10.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +1937 -0
  2. package/LICENSE +21 -0
  3. package/README.md +72 -0
  4. package/config.schema.json +1727 -0
  5. package/eslint.config.js +49 -0
  6. package/lib/connection/aws.js +174 -0
  7. package/lib/connection/ble.js +208 -0
  8. package/lib/connection/cert/AmazonRootCA1.pem +20 -0
  9. package/lib/connection/http.js +240 -0
  10. package/lib/connection/lan.js +284 -0
  11. package/lib/device/cooler-single.js +300 -0
  12. package/lib/device/dehumidifier-H7150.js +182 -0
  13. package/lib/device/dehumidifier-H7151.js +157 -0
  14. package/lib/device/diffuser-H7161.js +117 -0
  15. package/lib/device/diffuser-H7162.js +117 -0
  16. package/lib/device/fan-H7100.js +274 -0
  17. package/lib/device/fan-H7101.js +330 -0
  18. package/lib/device/fan-H7102.js +274 -0
  19. package/lib/device/fan-H7105.js +503 -0
  20. package/lib/device/fan-H7106.js +274 -0
  21. package/lib/device/fan-H7111.js +335 -0
  22. package/lib/device/heater-single.js +300 -0
  23. package/lib/device/heater1a.js +353 -0
  24. package/lib/device/heater1b.js +616 -0
  25. package/lib/device/heater2.js +838 -0
  26. package/lib/device/humidifier-H7140.js +224 -0
  27. package/lib/device/humidifier-H7141.js +257 -0
  28. package/lib/device/humidifier-H7142.js +522 -0
  29. package/lib/device/humidifier-H7143.js +157 -0
  30. package/lib/device/humidifier-H7148.js +157 -0
  31. package/lib/device/humidifier-H7160.js +446 -0
  32. package/lib/device/ice-maker-H7162.js +46 -0
  33. package/lib/device/index.js +105 -0
  34. package/lib/device/kettle.js +269 -0
  35. package/lib/device/light-switch.js +86 -0
  36. package/lib/device/light.js +617 -0
  37. package/lib/device/outlet-double.js +121 -0
  38. package/lib/device/outlet-single.js +172 -0
  39. package/lib/device/outlet-triple.js +160 -0
  40. package/lib/device/purifier-H7120.js +336 -0
  41. package/lib/device/purifier-H7121.js +336 -0
  42. package/lib/device/purifier-H7122.js +449 -0
  43. package/lib/device/purifier-H7123.js +411 -0
  44. package/lib/device/purifier-H7124.js +411 -0
  45. package/lib/device/purifier-H7126.js +296 -0
  46. package/lib/device/purifier-H7127.js +296 -0
  47. package/lib/device/purifier-H712C.js +296 -0
  48. package/lib/device/purifier-single.js +119 -0
  49. package/lib/device/sensor-button.js +22 -0
  50. package/lib/device/sensor-contact.js +22 -0
  51. package/lib/device/sensor-leak.js +87 -0
  52. package/lib/device/sensor-monitor.js +190 -0
  53. package/lib/device/sensor-presence.js +53 -0
  54. package/lib/device/sensor-thermo.js +144 -0
  55. package/lib/device/sensor-thermo4.js +55 -0
  56. package/lib/device/switch-double.js +121 -0
  57. package/lib/device/switch-single.js +95 -0
  58. package/lib/device/switch-triple.js +160 -0
  59. package/lib/device/tap-single.js +108 -0
  60. package/lib/device/template.js +43 -0
  61. package/lib/device/tv-single.js +84 -0
  62. package/lib/device/valve-single.js +155 -0
  63. package/lib/fakegato/LICENSE +21 -0
  64. package/lib/fakegato/fakegato-history.js +814 -0
  65. package/lib/fakegato/fakegato-storage.js +108 -0
  66. package/lib/fakegato/fakegato-timer.js +125 -0
  67. package/lib/fakegato/uuid.js +27 -0
  68. package/lib/homebridge-ui/public/index.html +433 -0
  69. package/lib/homebridge-ui/server.js +10 -0
  70. package/lib/index.js +8 -0
  71. package/lib/platform.js +1967 -0
  72. package/lib/utils/colour.js +564 -0
  73. package/lib/utils/constants.js +579 -0
  74. package/lib/utils/custom-chars.js +225 -0
  75. package/lib/utils/eve-chars.js +68 -0
  76. package/lib/utils/functions.js +117 -0
  77. package/lib/utils/lang-en.js +131 -0
  78. package/package.json +75 -0
@@ -0,0 +1,1727 @@
1
+ {
2
+ "pluginAlias": "Govee",
3
+ "pluginType": "platform",
4
+ "singular": true,
5
+ "customUi": true,
6
+ "customUiPath": "./lib/homebridge-ui",
7
+ "headerDisplay": "<p align=\"center\"><img width=\"60%\" src=\"https://user-images.githubusercontent.com/43026681/101324574-5e997d80-3862-11eb-81b0-932330f6e242.png\"></p><p align=\"center\">For help and support please visit our <a href=\"https://github.com/bwp91/homebridge-govee/wiki\">GitHub Wiki</a>. We hope you find this plugin useful!</p>",
8
+ "schema": {
9
+ "type": "object",
10
+ "properties": {
11
+ "name": {
12
+ "title": "Plugin Name",
13
+ "type": "string",
14
+ "default": "Govee"
15
+ },
16
+ "username": {
17
+ "type": "string",
18
+ "title": "Govee Email",
19
+ "description": "Required for most device models and for AWS/BLE connections. <a href=\"https://github.com/bwp91/homebridge-govee/wiki/Supported-Devices\" target=\"_blank\">Read more →</a>"
20
+ },
21
+ "password": {
22
+ "type": "string",
23
+ "title": "Govee Password",
24
+ "description": "Required for certain light models. <a href=\"https://github.com/bwp91/homebridge-govee/wiki/Supported-Devices\" target=\"_blank\">Read more →</a>"
25
+ },
26
+ "httpRefreshTime": {
27
+ "title": "HTTP Refresh Interval",
28
+ "type": "integer",
29
+ "description": "An interval (in seconds) in which your HTTP devices will refresh with the plugin. Must be 30 or more.",
30
+ "placeholder": 30,
31
+ "minimum": 30
32
+ },
33
+ "awsDisable": {
34
+ "title": "Disable AWS",
35
+ "type": "boolean",
36
+ "description": "If enabled, the plugin will not set up AWS discovery and control."
37
+ },
38
+ "bleDisable": {
39
+ "title": "Disable BLE",
40
+ "type": "boolean",
41
+ "description": "If enabled, the plugin will not set up BLE discovery and control."
42
+ },
43
+ "bleRefreshTime": {
44
+ "title": "BLE Refresh Interval",
45
+ "type": "integer",
46
+ "description": "An interval (in seconds) in which your BLE devices will refresh with the plugin. Must be 60 or more.",
47
+ "placeholder": 300,
48
+ "minimum": 60,
49
+ "condition": {
50
+ "functionBody": "return (!model.bleDisable);"
51
+ }
52
+ },
53
+ "lanDisable": {
54
+ "title": "Disable LAN",
55
+ "type": "boolean",
56
+ "description": "If enabled, the plugin will not set up LAN discovery and control."
57
+ },
58
+ "lanRefreshTime": {
59
+ "title": "LAN Refresh Interval",
60
+ "type": "integer",
61
+ "description": "An interval (in seconds) in which your LAN devices will refresh with the plugin. Must be 10 or more.",
62
+ "placeholder": 30,
63
+ "minimum": 10,
64
+ "condition": {
65
+ "functionBody": "return (!model.lanDisable);"
66
+ }
67
+ },
68
+ "lanScanInterval": {
69
+ "title": "LAN Scan Interval",
70
+ "type": "integer",
71
+ "description": "An interval (in seconds) in which a the plugin will scan your network for devices. Must be 30 or more.",
72
+ "placeholder": 60,
73
+ "minimum": 30,
74
+ "condition": {
75
+ "functionBody": "return (!model.lanDisable);"
76
+ }
77
+ },
78
+ "bleControlInterval": {
79
+ "title": "BLE Control Interval",
80
+ "type": "integer",
81
+ "description": "A minimum delay (in seconds) between device updates being sent. Increasing this may help if you find device updates are not working or if you use HomeKit scenes/groupings. Must be 5 or more.",
82
+ "placeholder": 5,
83
+ "minimum": 5
84
+ },
85
+ "colourSafeMode": {
86
+ "type": "boolean",
87
+ "title": "Colour Safe Mode",
88
+ "description": "If true then the plugin will not add colour temperature characteristic to lights."
89
+ },
90
+ "disableDeviceLogging": {
91
+ "type": "boolean",
92
+ "title": "Disable Device Logging",
93
+ "description": "Global logging setting for accessory status changes. If true then accessory status changes will not be logged. This can also be set per accessory later in the config."
94
+ },
95
+ "lightDevices": {
96
+ "title": "Light Devices",
97
+ "description": "Optional settings for Govee Light devices.",
98
+ "type": "array",
99
+ "items": {
100
+ "type": "object",
101
+ "properties": {
102
+ "label": {
103
+ "title": "Label",
104
+ "type": "string",
105
+ "description": "This setting is only used for naming LAN-only accessories and config identification."
106
+ },
107
+ "deviceId": {
108
+ "title": "Device ID",
109
+ "type": "string",
110
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
111
+ "minLength": 23,
112
+ "maxLength": 23
113
+ },
114
+ "ignoreDevice": {
115
+ "type": "boolean",
116
+ "title": "Hide From HomeKit",
117
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
118
+ "condition": {
119
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23);"
120
+ }
121
+ },
122
+ "showAs": {
123
+ "type": "string",
124
+ "title": "Show As",
125
+ "oneOf": [
126
+ {
127
+ "title": "1 Light (Default)",
128
+ "enum": [
129
+ "default"
130
+ ]
131
+ },
132
+ {
133
+ "title": "1 Switch",
134
+ "enum": [
135
+ "switch"
136
+ ]
137
+ }
138
+ ],
139
+ "condition": {
140
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !model.lightDevices[arrayIndices].ignoreDevice);"
141
+ }
142
+ },
143
+ "customAddress": {
144
+ "title": "Custom Bluetooth Address",
145
+ "type": "string",
146
+ "placeholder": "a1:b2:c3:d4:e5:f6",
147
+ "description": "The plugin may not be able to determine the bluetooth address of some older models. <a href=\"https://github.com/bwp91/homebridge-govee/wiki/Bluetooth-Control#finding-the-bluetooth-address\" target=\"_blank\">Read more →</a>",
148
+ "minLength": 17,
149
+ "maxLength": 17,
150
+ "condition": {
151
+ "functionBody": "return (!model.bleDisable && model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !model.lightDevices[arrayIndices].ignoreDevice);"
152
+ }
153
+ },
154
+ "customIPAddress": {
155
+ "title": "Custom IP Address",
156
+ "type": "string",
157
+ "placeholder": "192.168.1.15",
158
+ "description": "A fixed IP address for LAN mode, if the plugin cannot auto-discover this device.",
159
+ "minLength": 7,
160
+ "condition": {
161
+ "functionBody": "return (!model.lanDisable && model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !model.lightDevices[arrayIndices].ignoreDevice);"
162
+ }
163
+ },
164
+ "brightnessStep": {
165
+ "title": "Brightness Step",
166
+ "type": "integer",
167
+ "description": "A minimum step for the brightness slider in the Home app. Must be 1 or more.",
168
+ "placeholder": 1,
169
+ "minimum": 1,
170
+ "condition": {
171
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
172
+ }
173
+ },
174
+ "awsBrightnessNoScale": {
175
+ "type": "boolean",
176
+ "title": "AWS Brightness No Scale",
177
+ "description": "If true, the brightness value sent to/from via AWS will not be scaled to 0-100.",
178
+ "condition": {
179
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
180
+ }
181
+ },
182
+ "adaptiveLightingShift": {
183
+ "title": "Adaptive Lighting Shift",
184
+ "type": "integer",
185
+ "description": "The mired for each Adaptive Lighting update will be increased by this value, making the light appear warmer. Set to -1 to remove Adaptive Lighting feature. Must be -1 or more.",
186
+ "placeholder": 0,
187
+ "minimum": -1,
188
+ "condition": {
189
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
190
+ }
191
+ },
192
+ "awsColourMode": {
193
+ "type": "string",
194
+ "title": "AWS Colour Mode",
195
+ "oneOf": [
196
+ {
197
+ "title": "colorwc (Default)",
198
+ "enum": [
199
+ "default"
200
+ ]
201
+ },
202
+ {
203
+ "title": "{r, g, b}",
204
+ "enum": [
205
+ "rgb"
206
+ ]
207
+ },
208
+ {
209
+ "title": "{red, green, blue}",
210
+ "enum": [
211
+ "redgreenblue"
212
+ ]
213
+ }
214
+ ],
215
+ "condition": {
216
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
217
+ }
218
+ },
219
+ "scene": {
220
+ "title": "Scene",
221
+ "type": "object",
222
+ "properties": {
223
+ "sceneCode": {
224
+ "title": "Scene (AWS): Scene Code",
225
+ "type": "string",
226
+ "description": "Enter a scene code from the logs to create a button named 'Scene' (in Eve app).",
227
+ "condition": {
228
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
229
+ }
230
+ },
231
+ "bleCode": {
232
+ "title": "Scene (BLE): Scene Code",
233
+ "type": "string",
234
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
235
+ "condition": {
236
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
237
+ }
238
+ },
239
+ "showAs": {
240
+ "type": "string",
241
+ "title": "Scene: Show As",
242
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
243
+ "oneOf": [
244
+ {
245
+ "title": "Eve Switch (Default)",
246
+ "enum": [
247
+ "default"
248
+ ]
249
+ },
250
+ {
251
+ "title": "Accessory Switch",
252
+ "enum": [
253
+ "switch"
254
+ ]
255
+ }
256
+ ],
257
+ "condition": {
258
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].scene && (model.lightDevices[arrayIndices].scene.sceneCode || model.lightDevices[arrayIndices].scene.bleCode));"
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "sceneTwo": {
264
+ "title": "Scene 2",
265
+ "type": "object",
266
+ "properties": {
267
+ "sceneCode": {
268
+ "title": "Scene 2 (AWS): Scene Code",
269
+ "type": "string",
270
+ "description": "Enter a scene code from the logs to create a button named 'Scene 2' (in Eve app).",
271
+ "condition": {
272
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
273
+ }
274
+ },
275
+ "bleCode": {
276
+ "title": "Scene 2 (BLE): Scene Code",
277
+ "type": "string",
278
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
279
+ "condition": {
280
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
281
+ }
282
+ },
283
+ "showAs": {
284
+ "type": "string",
285
+ "title": "Scene 2: Show As",
286
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
287
+ "oneOf": [
288
+ {
289
+ "title": "Eve Switch (Default)",
290
+ "enum": [
291
+ "default"
292
+ ]
293
+ },
294
+ {
295
+ "title": "Accessory Switch",
296
+ "enum": [
297
+ "switch"
298
+ ]
299
+ }
300
+ ],
301
+ "condition": {
302
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].sceneTwo && (model.lightDevices[arrayIndices].sceneTwo.sceneCode || model.lightDevices[arrayIndices].sceneTwo.bleCode));"
303
+ }
304
+ }
305
+ }
306
+ },
307
+ "sceneThree": {
308
+ "title": "Scene 3",
309
+ "type": "object",
310
+ "properties": {
311
+ "sceneCode": {
312
+ "title": "Scene 3 (AWS): Scene Code",
313
+ "type": "string",
314
+ "description": "Enter a scene code from the logs to create a button named 'Scene 3' (in Eve app).",
315
+ "condition": {
316
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
317
+ }
318
+ },
319
+ "bleCode": {
320
+ "title": "Scene 3 (BLE): Scene Code",
321
+ "type": "string",
322
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
323
+ "condition": {
324
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
325
+ }
326
+ },
327
+ "showAs": {
328
+ "type": "string",
329
+ "title": "Scene 3: Show As",
330
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
331
+ "oneOf": [
332
+ {
333
+ "title": "Eve Switch (Default)",
334
+ "enum": [
335
+ "default"
336
+ ]
337
+ },
338
+ {
339
+ "title": "Accessory Switch",
340
+ "enum": [
341
+ "switch"
342
+ ]
343
+ }
344
+ ],
345
+ "condition": {
346
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].sceneThree && (model.lightDevices[arrayIndices].sceneThree.sceneCode || model.lightDevices[arrayIndices].sceneThree.bleCode));"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "sceneFour": {
352
+ "title": "Scene 4",
353
+ "type": "object",
354
+ "properties": {
355
+ "sceneCode": {
356
+ "title": "Scene 4 (AWS): Scene Code",
357
+ "type": "string",
358
+ "description": "Enter a scene code from the logs to create a button named 'Scene 4' (in Eve app).",
359
+ "condition": {
360
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
361
+ }
362
+ },
363
+ "bleCode": {
364
+ "title": "Scene 4 (BLE): Scene Code",
365
+ "type": "string",
366
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
367
+ "condition": {
368
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
369
+ }
370
+ },
371
+ "showAs": {
372
+ "type": "string",
373
+ "title": "Scene 4: Show As",
374
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
375
+ "oneOf": [
376
+ {
377
+ "title": "Eve Switch (Default)",
378
+ "enum": [
379
+ "default"
380
+ ]
381
+ },
382
+ {
383
+ "title": "Accessory Switch",
384
+ "enum": [
385
+ "switch"
386
+ ]
387
+ }
388
+ ],
389
+ "condition": {
390
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].sceneFour && (model.lightDevices[arrayIndices].sceneFour.sceneCode || model.lightDevices[arrayIndices].sceneFour.bleCode));"
391
+ }
392
+ }
393
+ }
394
+ },
395
+ "musicMode": {
396
+ "title": "Music Mode",
397
+ "type": "object",
398
+ "properties": {
399
+ "sceneCode": {
400
+ "title": "Music Mode (AWS): Scene Code",
401
+ "type": "string",
402
+ "description": "Enter a scene code from the logs to create a button named 'Music Mode' (in Eve app).",
403
+ "condition": {
404
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
405
+ }
406
+ },
407
+ "bleCode": {
408
+ "title": "Music Mode (BLE): Scene Code",
409
+ "type": "string",
410
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
411
+ "condition": {
412
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
413
+ }
414
+ },
415
+ "showAs": {
416
+ "type": "string",
417
+ "title": "Music Mode: Show As",
418
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
419
+ "oneOf": [
420
+ {
421
+ "title": "Eve Switch (Default)",
422
+ "enum": [
423
+ "default"
424
+ ]
425
+ },
426
+ {
427
+ "title": "Accessory Switch",
428
+ "enum": [
429
+ "switch"
430
+ ]
431
+ }
432
+ ],
433
+ "condition": {
434
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].musicMode && (model.lightDevices[arrayIndices].musicMode.sceneCode || model.lightDevices[arrayIndices].musicMode.bleCode));"
435
+ }
436
+ }
437
+ }
438
+ },
439
+ "musicModeTwo": {
440
+ "title": "Music Mode 2",
441
+ "type": "object",
442
+ "properties": {
443
+ "sceneCode": {
444
+ "title": "Music Mode 2 (AWS): Scene Code",
445
+ "type": "string",
446
+ "description": "Enter a scene code from the logs to create a button named 'Music Mode 2' (in Eve app).",
447
+ "condition": {
448
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
449
+ }
450
+ },
451
+ "bleCode": {
452
+ "title": "Music Mode 2 (BLE): Scene Code",
453
+ "type": "string",
454
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
455
+ "condition": {
456
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
457
+ }
458
+ },
459
+ "showAs": {
460
+ "type": "string",
461
+ "title": "Music Mode 2: Show As",
462
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
463
+ "oneOf": [
464
+ {
465
+ "title": "Eve Switch (Default)",
466
+ "enum": [
467
+ "default"
468
+ ]
469
+ },
470
+ {
471
+ "title": "Accessory Switch",
472
+ "enum": [
473
+ "switch"
474
+ ]
475
+ }
476
+ ],
477
+ "condition": {
478
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].musicModeTwo && (model.lightDevices[arrayIndices].musicModeTwo.sceneCode || model.lightDevices[arrayIndices].musicModeTwo.bleCode));"
479
+ }
480
+ }
481
+ }
482
+ },
483
+ "videoMode": {
484
+ "title": "Video Mode",
485
+ "type": "object",
486
+ "properties": {
487
+ "sceneCode": {
488
+ "title": "Video Mode (AWS): Scene Code",
489
+ "type": "string",
490
+ "description": "Enter a scene code from the logs to create a button named 'Video Mode' (in Eve app).",
491
+ "condition": {
492
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
493
+ }
494
+ },
495
+ "bleCode": {
496
+ "title": "Video Mode (BLE): Scene Code",
497
+ "type": "string",
498
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
499
+ "condition": {
500
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
501
+ }
502
+ },
503
+ "showAs": {
504
+ "type": "string",
505
+ "title": "Video Mode: Show As",
506
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
507
+ "oneOf": [
508
+ {
509
+ "title": "Eve Switch (Default)",
510
+ "enum": [
511
+ "default"
512
+ ]
513
+ },
514
+ {
515
+ "title": "Accessory Switch",
516
+ "enum": [
517
+ "switch"
518
+ ]
519
+ }
520
+ ],
521
+ "condition": {
522
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].videoMode && (model.lightDevices[arrayIndices].videoMode.sceneCode || model.lightDevices[arrayIndices].videoMode.bleCode));"
523
+ }
524
+ }
525
+ }
526
+ },
527
+ "videoModeTwo": {
528
+ "title": "Video Mode 2",
529
+ "type": "object",
530
+ "properties": {
531
+ "sceneCode": {
532
+ "title": "Video Mode 2 (AWS): Scene Code",
533
+ "type": "string",
534
+ "description": "Enter a scene code from the logs to create a button named 'Video Mode 2' (in Eve app).",
535
+ "condition": {
536
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
537
+ }
538
+ },
539
+ "bleCode": {
540
+ "title": "Video Mode 2 (BLE): Scene Code",
541
+ "type": "string",
542
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
543
+ "condition": {
544
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
545
+ }
546
+ },
547
+ "showAs": {
548
+ "type": "string",
549
+ "title": "Video Mode 2: Show As",
550
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
551
+ "oneOf": [
552
+ {
553
+ "title": "Eve Switch (Default)",
554
+ "enum": [
555
+ "default"
556
+ ]
557
+ },
558
+ {
559
+ "title": "Accessory Switch",
560
+ "enum": [
561
+ "switch"
562
+ ]
563
+ }
564
+ ],
565
+ "condition": {
566
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].videoModeTwo && (model.lightDevices[arrayIndices].videoModeTwo.sceneCode || model.lightDevices[arrayIndices].videoModeTwo.bleCode));"
567
+ }
568
+ }
569
+ }
570
+ },
571
+ "diyMode": {
572
+ "title": "DIY Mode",
573
+ "type": "object",
574
+ "properties": {
575
+ "sceneCode": {
576
+ "title": "DIY Mode (AWS): Scene Code",
577
+ "type": "string",
578
+ "description": "Enter a scene code from the logs to create a button named 'DIY Mode' (in Eve app).",
579
+ "condition": {
580
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
581
+ }
582
+ },
583
+ "bleCode": {
584
+ "title": "DIY Mode (BLE): Scene Code",
585
+ "type": "string",
586
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
587
+ "condition": {
588
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
589
+ }
590
+ },
591
+ "showAs": {
592
+ "type": "string",
593
+ "title": "DIY Mode: Show As",
594
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
595
+ "oneOf": [
596
+ {
597
+ "title": "Eve Switch (Default)",
598
+ "enum": [
599
+ "default"
600
+ ]
601
+ },
602
+ {
603
+ "title": "Accessory Switch",
604
+ "enum": [
605
+ "switch"
606
+ ]
607
+ }
608
+ ],
609
+ "condition": {
610
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].diyMode && (model.lightDevices[arrayIndices].diyMode.sceneCode || model.lightDevices[arrayIndices].diyMode.bleCode));"
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "diyModeTwo": {
616
+ "title": "DIY Mode 2",
617
+ "type": "object",
618
+ "properties": {
619
+ "sceneCode": {
620
+ "title": "DIY Mode 2 (AWS): Scene Code",
621
+ "type": "string",
622
+ "description": "Enter a scene code from the logs to create a button named 'DIY Mode 2' (in Eve app).",
623
+ "condition": {
624
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
625
+ }
626
+ },
627
+ "bleCode": {
628
+ "title": "DIY Mode 2 (BLE): Scene Code",
629
+ "type": "string",
630
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
631
+ "condition": {
632
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
633
+ }
634
+ },
635
+ "showAs": {
636
+ "type": "string",
637
+ "title": "DIY Mode 2: Show As",
638
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
639
+ "oneOf": [
640
+ {
641
+ "title": "Eve Switch (Default)",
642
+ "enum": [
643
+ "default"
644
+ ]
645
+ },
646
+ {
647
+ "title": "Accessory Switch",
648
+ "enum": [
649
+ "switch"
650
+ ]
651
+ }
652
+ ],
653
+ "condition": {
654
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].diyModeTwo && (model.lightDevices[arrayIndices].diyModeTwo.sceneCode || model.lightDevices[arrayIndices].diyModeTwo.bleCode));"
655
+ }
656
+ }
657
+ }
658
+ },
659
+ "diyModeThree": {
660
+ "title": "DIY Mode 3",
661
+ "type": "object",
662
+ "properties": {
663
+ "sceneCode": {
664
+ "title": "DIY Mode 3 (AWS): Scene Code",
665
+ "type": "string",
666
+ "description": "Enter a scene code from the logs to create a button named 'DIY Mode 3' (in Eve app).",
667
+ "condition": {
668
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
669
+ }
670
+ },
671
+ "bleCode": {
672
+ "title": "DIY Mode 3 (BLE): Scene Code",
673
+ "type": "string",
674
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
675
+ "condition": {
676
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
677
+ }
678
+ },
679
+ "showAs": {
680
+ "type": "string",
681
+ "title": "DIY Mode 3: Show As",
682
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
683
+ "oneOf": [
684
+ {
685
+ "title": "Eve Switch (Default)",
686
+ "enum": [
687
+ "default"
688
+ ]
689
+ },
690
+ {
691
+ "title": "Accessory Switch",
692
+ "enum": [
693
+ "switch"
694
+ ]
695
+ }
696
+ ],
697
+ "condition": {
698
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].diyModeThree && (model.lightDevices[arrayIndices].diyModeThree.sceneCode || model.lightDevices[arrayIndices].diyModeThree.bleCode));"
699
+ }
700
+ }
701
+ }
702
+ },
703
+ "diyModeFour": {
704
+ "title": "DIY Mode 4",
705
+ "type": "object",
706
+ "properties": {
707
+ "sceneCode": {
708
+ "title": "DIY Mode 4 (AWS): Scene Code",
709
+ "type": "string",
710
+ "description": "Enter a scene code from the logs to create a button named 'DIY Mode 4' (in Eve app).",
711
+ "condition": {
712
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
713
+ }
714
+ },
715
+ "bleCode": {
716
+ "title": "DIY Mode 4 (BLE): Scene Code",
717
+ "type": "string",
718
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
719
+ "condition": {
720
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
721
+ }
722
+ },
723
+ "showAs": {
724
+ "type": "string",
725
+ "title": "DIY Mode 4: Show As",
726
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
727
+ "oneOf": [
728
+ {
729
+ "title": "Eve Switch (Default)",
730
+ "enum": [
731
+ "default"
732
+ ]
733
+ },
734
+ {
735
+ "title": "Accessory Switch",
736
+ "enum": [
737
+ "switch"
738
+ ]
739
+ }
740
+ ],
741
+ "condition": {
742
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].diyModeFour && (model.lightDevices[arrayIndices].diyModeFour.sceneCode || model.lightDevices[arrayIndices].diyModeFour.bleCode));"
743
+ }
744
+ }
745
+ }
746
+ },
747
+ "segmented": {
748
+ "title": "Segmented",
749
+ "type": "object",
750
+ "properties": {
751
+ "sceneCode": {
752
+ "title": "Segmented (AWS): Scene Code",
753
+ "type": "string",
754
+ "description": "Enter a scene code from the logs to create a button named 'Segmented' (in Eve app).",
755
+ "condition": {
756
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
757
+ }
758
+ },
759
+ "bleCode": {
760
+ "title": "Segmented (BLE): Scene Code",
761
+ "type": "string",
762
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
763
+ "condition": {
764
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
765
+ }
766
+ },
767
+ "showAs": {
768
+ "type": "string",
769
+ "title": "Segmented: Show As",
770
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
771
+ "oneOf": [
772
+ {
773
+ "title": "Eve Switch (Default)",
774
+ "enum": [
775
+ "default"
776
+ ]
777
+ },
778
+ {
779
+ "title": "Accessory Switch",
780
+ "enum": [
781
+ "switch"
782
+ ]
783
+ }
784
+ ],
785
+ "condition": {
786
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].segmented && (model.lightDevices[arrayIndices].segmented.sceneCode || model.lightDevices[arrayIndices].segmented.bleCode));"
787
+ }
788
+ }
789
+ }
790
+ },
791
+ "segmentedTwo": {
792
+ "title": "Segmented 2",
793
+ "type": "object",
794
+ "properties": {
795
+ "sceneCode": {
796
+ "title": "Segmented 2 (AWS): Scene Code",
797
+ "type": "string",
798
+ "description": "Enter a scene code from the logs to create a button named 'Segmented 2' (in Eve app).",
799
+ "condition": {
800
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
801
+ }
802
+ },
803
+ "bleCode": {
804
+ "title": "Segmented 2 (BLE): Scene Code",
805
+ "type": "string",
806
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
807
+ "condition": {
808
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
809
+ }
810
+ },
811
+ "showAs": {
812
+ "type": "string",
813
+ "title": "Segmented 2: Show As",
814
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
815
+ "oneOf": [
816
+ {
817
+ "title": "Eve Switch (Default)",
818
+ "enum": [
819
+ "default"
820
+ ]
821
+ },
822
+ {
823
+ "title": "Accessory Switch",
824
+ "enum": [
825
+ "switch"
826
+ ]
827
+ }
828
+ ],
829
+ "condition": {
830
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].segmentedTwo && (model.lightDevices[arrayIndices].segmentedTwo.sceneCode || model.lightDevices[arrayIndices].segmentedTwo.bleCode));"
831
+ }
832
+ }
833
+ }
834
+ },
835
+ "segmentedThree": {
836
+ "title": "Segmented 3",
837
+ "type": "object",
838
+ "properties": {
839
+ "sceneCode": {
840
+ "title": "Segmented 3 (AWS): Scene Code",
841
+ "type": "string",
842
+ "description": "Enter a scene code from the logs to create a button named 'Segmented 3' (in Eve app).",
843
+ "condition": {
844
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
845
+ }
846
+ },
847
+ "bleCode": {
848
+ "title": "Segmented 3 (BLE): Scene Code",
849
+ "type": "string",
850
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
851
+ "condition": {
852
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
853
+ }
854
+ },
855
+ "showAs": {
856
+ "type": "string",
857
+ "title": "Segmented 3: Show As",
858
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
859
+ "oneOf": [
860
+ {
861
+ "title": "Eve Switch (Default)",
862
+ "enum": [
863
+ "default"
864
+ ]
865
+ },
866
+ {
867
+ "title": "Accessory Switch",
868
+ "enum": [
869
+ "switch"
870
+ ]
871
+ }
872
+ ],
873
+ "condition": {
874
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].segmentedThree && (model.lightDevices[arrayIndices].segmentedThree.sceneCode || model.lightDevices[arrayIndices].segmentedThree.bleCode));"
875
+ }
876
+ }
877
+ }
878
+ },
879
+ "segmentedFour": {
880
+ "title": "Segmented 4",
881
+ "type": "object",
882
+ "properties": {
883
+ "sceneCode": {
884
+ "title": "Segmented 4 (AWS): Scene Code",
885
+ "type": "string",
886
+ "description": "Enter a scene code from the logs to create a button named 'Segmented 4' (in Eve app).",
887
+ "condition": {
888
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
889
+ }
890
+ },
891
+ "bleCode": {
892
+ "title": "Segmented 4 (BLE): Scene Code",
893
+ "type": "string",
894
+ "description": "Can be (1) left blank, (2) used instead of, or (3) used along with the above AWS code. In the case of (3) please make sure both codes correspond to the same Govee mode.",
895
+ "condition": {
896
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice);"
897
+ }
898
+ },
899
+ "showAs": {
900
+ "type": "string",
901
+ "title": "Segmented 4: Show As",
902
+ "description": "Change this setting to Accessory Switch to show this as an extra switch in the Home app.",
903
+ "oneOf": [
904
+ {
905
+ "title": "Eve Switch (Default)",
906
+ "enum": [
907
+ "default"
908
+ ]
909
+ },
910
+ {
911
+ "title": "Accessory Switch",
912
+ "enum": [
913
+ "switch"
914
+ ]
915
+ }
916
+ ],
917
+ "condition": {
918
+ "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 23 && !['switch'].includes(model.lightDevices[arrayIndices].showAs) && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].segmentedFour && (model.lightDevices[arrayIndices].segmentedFour.sceneCode || model.lightDevices[arrayIndices].segmentedFour.bleCode));"
919
+ }
920
+ }
921
+ }
922
+ }
923
+ }
924
+ }
925
+ },
926
+ "switchDevices": {
927
+ "title": "Outlet Devices",
928
+ "description": "Optional settings for Govee Outlet devices.",
929
+ "type": "array",
930
+ "items": {
931
+ "type": "object",
932
+ "properties": {
933
+ "label": {
934
+ "title": "Label",
935
+ "type": "string",
936
+ "description": "This setting is only used for config identification."
937
+ },
938
+ "deviceId": {
939
+ "title": "Device ID",
940
+ "type": "string",
941
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
942
+ "minLength": 23,
943
+ "maxLength": 23
944
+ },
945
+ "ignoreDevice": {
946
+ "type": "boolean",
947
+ "title": "Hide From HomeKit",
948
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
949
+ "condition": {
950
+ "functionBody": "return (model.switchDevices && model.switchDevices[arrayIndices] && model.switchDevices[arrayIndices].deviceId && model.switchDevices[arrayIndices].deviceId.length === 23);"
951
+ }
952
+ },
953
+ "showAs": {
954
+ "type": "string",
955
+ "title": "Show As",
956
+ "oneOf": [
957
+ {
958
+ "title": "1 Outlet (Default)",
959
+ "enum": [
960
+ "default"
961
+ ]
962
+ },
963
+ {
964
+ "title": "1 Switch",
965
+ "enum": [
966
+ "switch"
967
+ ]
968
+ },
969
+ {
970
+ "title": "1 Air Purifier",
971
+ "enum": [
972
+ "purifier"
973
+ ]
974
+ },
975
+ {
976
+ "title": "1 Heater",
977
+ "enum": [
978
+ "heater"
979
+ ]
980
+ },
981
+ {
982
+ "title": "1 Cooler",
983
+ "enum": [
984
+ "cooler"
985
+ ]
986
+ },
987
+ {
988
+ "title": "1 Tap/Faucet",
989
+ "enum": [
990
+ "tap"
991
+ ]
992
+ },
993
+ {
994
+ "title": "1 Valve",
995
+ "enum": [
996
+ "valve"
997
+ ]
998
+ },
999
+ {
1000
+ "title": "1 Audio Receiver (External Accessory)",
1001
+ "enum": [
1002
+ "audio"
1003
+ ]
1004
+ },
1005
+ {
1006
+ "title": "1 Set Top Box (External Accessory)",
1007
+ "enum": [
1008
+ "box"
1009
+ ]
1010
+ },
1011
+ {
1012
+ "title": "1 Streaming Stick (External Accessory)",
1013
+ "enum": [
1014
+ "stick"
1015
+ ]
1016
+ }
1017
+ ],
1018
+ "condition": {
1019
+ "functionBody": "return (model.switchDevices && model.switchDevices[arrayIndices] && model.switchDevices[arrayIndices].deviceId && model.switchDevices[arrayIndices].deviceId.length === 23 && !model.switchDevices[arrayIndices].ignoreDevice);"
1020
+ }
1021
+ },
1022
+ "temperatureSource": {
1023
+ "type": "string",
1024
+ "title": "Temperature Sensor ID",
1025
+ "description": "Enter a Govee, eWeLink or Meross device ID which provides a current temperature reading.",
1026
+ "condition": {
1027
+ "functionBody": "return (model.switchDevices && model.switchDevices[arrayIndices] && model.switchDevices[arrayIndices].deviceId && model.switchDevices[arrayIndices].deviceId.length === 23 && ['heater', 'cooler'].includes(model.switchDevices[arrayIndices].showAs) && !model.switchDevices[arrayIndices].ignoreDevice);"
1028
+ }
1029
+ }
1030
+ }
1031
+ }
1032
+ },
1033
+ "leakDevices": {
1034
+ "title": "Leak Sensor Devices",
1035
+ "description": "Optional settings for Govee Leak Sensor devices.",
1036
+ "type": "array",
1037
+ "items": {
1038
+ "type": "object",
1039
+ "properties": {
1040
+ "label": {
1041
+ "title": "Label",
1042
+ "type": "string",
1043
+ "description": "This setting is only used for config identification."
1044
+ },
1045
+ "deviceId": {
1046
+ "title": "Device ID",
1047
+ "type": "string",
1048
+ "description": "Enter the 18 digit Govee Device ID to begin (e.g. 12AB34CD56EF78009F).",
1049
+ "minLength": 18,
1050
+ "maxLength": 18
1051
+ },
1052
+ "ignoreDevice": {
1053
+ "type": "boolean",
1054
+ "title": "Hide From HomeKit",
1055
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1056
+ "condition": {
1057
+ "functionBody": "return (model.leakDevices && model.leakDevices[arrayIndices] && model.leakDevices[arrayIndices].deviceId && model.leakDevices[arrayIndices].deviceId.length === 18);"
1058
+ }
1059
+ },
1060
+ "lowBattThreshold": {
1061
+ "type": "integer",
1062
+ "title": "Low Battery Threshold",
1063
+ "description": "HomeKit will set the low battery status for this device when the battery reaches this percentage level. Must be 1 or more.",
1064
+ "placeholder": 20,
1065
+ "minimum": 1,
1066
+ "condition": {
1067
+ "functionBody": "return (model.leakDevices && model.leakDevices[arrayIndices] && model.leakDevices[arrayIndices].deviceId && model.leakDevices[arrayIndices].deviceId.length === 18 && !model.leakDevices[arrayIndices].ignoreDevice);"
1068
+ }
1069
+ }
1070
+ }
1071
+ }
1072
+ },
1073
+ "thermoDevices": {
1074
+ "title": "Thermo Sensor Devices",
1075
+ "description": "Optional settings for Govee Thermo-Hygrometer devices.",
1076
+ "type": "array",
1077
+ "items": {
1078
+ "type": "object",
1079
+ "properties": {
1080
+ "label": {
1081
+ "title": "Label",
1082
+ "type": "string",
1083
+ "description": "This setting is only used for config identification."
1084
+ },
1085
+ "deviceId": {
1086
+ "title": "Device ID",
1087
+ "type": "string",
1088
+ "description": "Enter the 23/26 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1089
+ "minLength": 23,
1090
+ "maxLength": 23
1091
+ },
1092
+ "ignoreDevice": {
1093
+ "type": "boolean",
1094
+ "title": "Hide From HomeKit",
1095
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1096
+ "condition": {
1097
+ "functionBody": "return (model.thermoDevices && model.thermoDevices[arrayIndices] && model.thermoDevices[arrayIndices].deviceId && [23,26].includes(model.thermoDevices[arrayIndices].deviceId.length));"
1098
+ }
1099
+ },
1100
+ "lowBattThreshold": {
1101
+ "type": "integer",
1102
+ "title": "Low Battery Threshold",
1103
+ "description": "HomeKit will set the low battery status for this device when the battery reaches this percentage level. Must be 1 or more.",
1104
+ "placeholder": 20,
1105
+ "minimum": 1,
1106
+ "condition": {
1107
+ "functionBody": "return (model.thermoDevices && model.thermoDevices[arrayIndices] && model.thermoDevices[arrayIndices].deviceId && [23,26].includes(model.thermoDevices[arrayIndices].deviceId.length) && !model.thermoDevices[arrayIndices].ignoreDevice);"
1108
+ }
1109
+ }
1110
+ }
1111
+ }
1112
+ },
1113
+ "fanDevices": {
1114
+ "title": "Fan Devices",
1115
+ "description": "Optional settings for Govee Fan devices.",
1116
+ "type": "array",
1117
+ "items": {
1118
+ "type": "object",
1119
+ "properties": {
1120
+ "label": {
1121
+ "title": "Label",
1122
+ "type": "string",
1123
+ "description": "This setting is only used for config identification."
1124
+ },
1125
+ "deviceId": {
1126
+ "title": "Device ID",
1127
+ "type": "string",
1128
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1129
+ "minLength": 23,
1130
+ "maxLength": 23
1131
+ },
1132
+ "ignoreDevice": {
1133
+ "type": "boolean",
1134
+ "title": "Hide From HomeKit",
1135
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1136
+ "condition": {
1137
+ "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].deviceId && model.fanDevices[arrayIndices].deviceId.length === 23);"
1138
+ }
1139
+ }
1140
+ }
1141
+ }
1142
+ },
1143
+ "heaterDevices": {
1144
+ "title": "Heater Devices",
1145
+ "description": "Optional settings for Govee Heater devices.",
1146
+ "type": "array",
1147
+ "items": {
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "label": {
1151
+ "title": "Label",
1152
+ "type": "string",
1153
+ "description": "This setting is only used for config identification."
1154
+ },
1155
+ "deviceId": {
1156
+ "title": "Device ID",
1157
+ "type": "string",
1158
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1159
+ "minLength": 23,
1160
+ "maxLength": 23
1161
+ },
1162
+ "ignoreDevice": {
1163
+ "type": "boolean",
1164
+ "title": "Hide From HomeKit",
1165
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1166
+ "condition": {
1167
+ "functionBody": "return (model.heaterDevices && model.heaterDevices[arrayIndices] && model.heaterDevices[arrayIndices].deviceId && model.heaterDevices[arrayIndices].deviceId.length === 23);"
1168
+ }
1169
+ },
1170
+ "tempReporting": {
1171
+ "type": "boolean",
1172
+ "title": "Temperature Reporting",
1173
+ "description": "Enable this if your H7130 device reports ambient temperature.",
1174
+ "condition": {
1175
+ "functionBody": "return (model.heaterDevices && model.heaterDevices[arrayIndices] && model.heaterDevices[arrayIndices].deviceId && model.heaterDevices[arrayIndices].deviceId.length === 23);"
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ },
1181
+ "humidifierDevices": {
1182
+ "title": "Humidifier Devices",
1183
+ "description": "Optional settings for Govee Humidifier devices.",
1184
+ "type": "array",
1185
+ "items": {
1186
+ "type": "object",
1187
+ "properties": {
1188
+ "label": {
1189
+ "title": "Label",
1190
+ "type": "string",
1191
+ "description": "This setting is only used for config identification."
1192
+ },
1193
+ "deviceId": {
1194
+ "title": "Device ID",
1195
+ "type": "string",
1196
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1197
+ "minLength": 23,
1198
+ "maxLength": 23
1199
+ },
1200
+ "ignoreDevice": {
1201
+ "type": "boolean",
1202
+ "title": "Hide From HomeKit",
1203
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1204
+ "condition": {
1205
+ "functionBody": "return (model.humidifierDevices && model.humidifierDevices[arrayIndices] && model.humidifierDevices[arrayIndices].deviceId && model.humidifierDevices[arrayIndices].deviceId.length === 23);"
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+ },
1211
+ "dehumidifierDevices": {
1212
+ "title": "Dehumidifier Devices",
1213
+ "description": "Optional settings for Govee Dehumidifier devices.",
1214
+ "type": "array",
1215
+ "items": {
1216
+ "type": "object",
1217
+ "properties": {
1218
+ "label": {
1219
+ "title": "Label",
1220
+ "type": "string",
1221
+ "description": "This setting is only used for config identification."
1222
+ },
1223
+ "deviceId": {
1224
+ "title": "Device ID",
1225
+ "type": "string",
1226
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1227
+ "minLength": 23,
1228
+ "maxLength": 23
1229
+ },
1230
+ "ignoreDevice": {
1231
+ "type": "boolean",
1232
+ "title": "Hide From HomeKit",
1233
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1234
+ "condition": {
1235
+ "functionBody": "return (model.dehumidifierDevices && model.dehumidifierDevices[arrayIndices] && model.dehumidifierDevices[arrayIndices].deviceId && model.dehumidifierDevices[arrayIndices].deviceId.length === 23);"
1236
+ }
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ "purifierDevices": {
1242
+ "title": "Purifier Devices",
1243
+ "description": "Optional settings for Govee Purifier devices.",
1244
+ "type": "array",
1245
+ "items": {
1246
+ "type": "object",
1247
+ "properties": {
1248
+ "label": {
1249
+ "title": "Label",
1250
+ "type": "string",
1251
+ "description": "This setting is only used for config identification."
1252
+ },
1253
+ "deviceId": {
1254
+ "title": "Device ID",
1255
+ "type": "string",
1256
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1257
+ "minLength": 23,
1258
+ "maxLength": 23
1259
+ },
1260
+ "ignoreDevice": {
1261
+ "type": "boolean",
1262
+ "title": "Hide From HomeKit",
1263
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1264
+ "condition": {
1265
+ "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].deviceId && model.purifierDevices[arrayIndices].deviceId.length === 23);"
1266
+ }
1267
+ }
1268
+ }
1269
+ }
1270
+ },
1271
+ "diffuserDevices": {
1272
+ "title": "Diffuser Devices",
1273
+ "description": "Optional settings for Govee Diffuser devices.",
1274
+ "type": "array",
1275
+ "items": {
1276
+ "type": "object",
1277
+ "properties": {
1278
+ "label": {
1279
+ "title": "Label",
1280
+ "type": "string",
1281
+ "description": "This setting is only used for config identification."
1282
+ },
1283
+ "deviceId": {
1284
+ "title": "Device ID",
1285
+ "type": "string",
1286
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1287
+ "minLength": 23,
1288
+ "maxLength": 23
1289
+ },
1290
+ "ignoreDevice": {
1291
+ "type": "boolean",
1292
+ "title": "Hide From HomeKit",
1293
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1294
+ "condition": {
1295
+ "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].deviceId && model.diffuserDevices[arrayIndices].deviceId.length === 23);"
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ },
1301
+ "kettleDevices": {
1302
+ "title": "Kettle Devices",
1303
+ "description": "Optional settings for Govee Kettle devices.",
1304
+ "type": "array",
1305
+ "items": {
1306
+ "type": "object",
1307
+ "properties": {
1308
+ "label": {
1309
+ "title": "Label",
1310
+ "type": "string",
1311
+ "description": "This setting is only used for config identification."
1312
+ },
1313
+ "deviceId": {
1314
+ "title": "Device ID",
1315
+ "type": "string",
1316
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1317
+ "minLength": 23,
1318
+ "maxLength": 23
1319
+ },
1320
+ "ignoreDevice": {
1321
+ "type": "boolean",
1322
+ "title": "Hide From HomeKit",
1323
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1324
+ "condition": {
1325
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23);"
1326
+ }
1327
+ },
1328
+ "hideModeGreenTea": {
1329
+ "type": "boolean",
1330
+ "title": "Hide Green Tea Mode",
1331
+ "description": "If true, the Green Tea mode switch will be hidden in HomeKit.",
1332
+ "condition": {
1333
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23 && !model.kettleDevices[arrayIndices].ignoreDevice);"
1334
+ }
1335
+ },
1336
+ "hideModeOolongTea": {
1337
+ "type": "boolean",
1338
+ "title": "Hide Oolong Tea Mode",
1339
+ "description": "If true, the Oolong Tea mode switch will be hidden in HomeKit.",
1340
+ "condition": {
1341
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23 && !model.kettleDevices[arrayIndices].ignoreDevice);"
1342
+ }
1343
+ },
1344
+ "hideModeCoffee": {
1345
+ "type": "boolean",
1346
+ "title": "Hide Coffee Mode",
1347
+ "description": "If true, the Coffee mode switch will be hidden in HomeKit.",
1348
+ "condition": {
1349
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23 && !model.kettleDevices[arrayIndices].ignoreDevice);"
1350
+ }
1351
+ },
1352
+ "hideModeBlackTea": {
1353
+ "type": "boolean",
1354
+ "title": "Hide Back Tea/Boil Mode",
1355
+ "description": "If true, the Black Tea/Boil mode switch will be hidden in HomeKit.",
1356
+ "condition": {
1357
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23 && !model.kettleDevices[arrayIndices].ignoreDevice);"
1358
+ }
1359
+ },
1360
+ "showCustomMode1": {
1361
+ "title": "Enable Custom Mode 1",
1362
+ "type": "boolean",
1363
+ "condition": {
1364
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23 && !model.kettleDevices[arrayIndices].ignoreDevice);"
1365
+ }
1366
+ },
1367
+ "showCustomMode2": {
1368
+ "title": "Enable Custom Mode 2",
1369
+ "type": "boolean",
1370
+ "condition": {
1371
+ "functionBody": "return (model.kettleDevices && model.kettleDevices[arrayIndices] && model.kettleDevices[arrayIndices].deviceId && model.kettleDevices[arrayIndices].deviceId.length === 23 && !model.kettleDevices[arrayIndices].ignoreDevice);"
1372
+ }
1373
+ }
1374
+ }
1375
+ }
1376
+ },
1377
+ "iceMakerDevices": {
1378
+ "title": "Ice Maker Devices",
1379
+ "description": "Optional settings for Govee Ice Maker devices.",
1380
+ "type": "array",
1381
+ "items": {
1382
+ "type": "object",
1383
+ "properties": {
1384
+ "label": {
1385
+ "title": "Label",
1386
+ "type": "string",
1387
+ "description": "This setting is only used for config identification."
1388
+ },
1389
+ "deviceId": {
1390
+ "title": "Device ID",
1391
+ "type": "string",
1392
+ "description": "Enter the 23 digit Govee Device ID to begin (e.g. 12:AB:A1:C5:A8:99:D2:17).",
1393
+ "minLength": 23,
1394
+ "maxLength": 23
1395
+ },
1396
+ "ignoreDevice": {
1397
+ "type": "boolean",
1398
+ "title": "Hide From HomeKit",
1399
+ "description": "If true, this accessory will be removed and ignored from HomeKit.",
1400
+ "condition": {
1401
+ "functionBody": "return (model.iceMakerDevices && model.iceMakerDevices[arrayIndices] && model.iceMakerDevices[arrayIndices].deviceId && model.iceMakerDevices[arrayIndices].deviceId.length === 23);"
1402
+ }
1403
+ }
1404
+ }
1405
+ }
1406
+ }
1407
+ }
1408
+ },
1409
+ "layout": [
1410
+ {
1411
+ "type": "fieldset",
1412
+ "title": "Required Settings",
1413
+ "items": [
1414
+ "username",
1415
+ "password"
1416
+ ]
1417
+ },
1418
+ {
1419
+ "type": "fieldset",
1420
+ "title": "Advanced Settings",
1421
+ "description": "Advanced settings for the plugin, including interval options.",
1422
+ "expandable": true,
1423
+ "items": [
1424
+ "disableDeviceLogging",
1425
+ "httpRefreshTime",
1426
+ "awsDisable",
1427
+ "bleDisable",
1428
+ "bleRefreshTime",
1429
+ "lanDisable",
1430
+ "lanRefreshTime",
1431
+ "lanScanInterval",
1432
+ "bleControlInterval",
1433
+ "colourSafeMode"
1434
+ ]
1435
+ },
1436
+ {
1437
+ "key": "lightDevices",
1438
+ "expandable": true,
1439
+ "title": "Light Devices",
1440
+ "description": "Optional settings for Govee Light devices.",
1441
+ "add": "Add Another Device",
1442
+ "type": "array",
1443
+ "items": [
1444
+ {
1445
+ "type": "fieldset",
1446
+ "items": [
1447
+ "lightDevices[].label",
1448
+ "lightDevices[].deviceId",
1449
+ "lightDevices[].ignoreDevice",
1450
+ "lightDevices[].showAs",
1451
+ "lightDevices[].customAddress",
1452
+ "lightDevices[].customIPAddress",
1453
+ "lightDevices[].brightnessStep",
1454
+ "lightDevices[].awsBrightnessNoScale",
1455
+ "lightDevices[].adaptiveLightingShift",
1456
+ "lightDevices[].awsColourMode",
1457
+ {
1458
+ "expandable": true,
1459
+ "title": "Custom Scenes/Modes",
1460
+ "type": "fieldset",
1461
+ "description": "Use these settings to start creating HomeKit scenes with your Govee scenes, music mode and DIY modes. <a href=\"https://github.com/bwp91/homebridge-govee/wiki/Scene%2C-Music%2C-DIY-Modes\" target=\"_blank\">Read more →</a>",
1462
+ "items": [
1463
+ "lightDevices[].scene.sceneCode",
1464
+ "lightDevices[].scene.bleCode",
1465
+ "lightDevices[].scene.showAs",
1466
+ "lightDevices[].sceneTwo.sceneCode",
1467
+ "lightDevices[].sceneTwo.bleCode",
1468
+ "lightDevices[].sceneTwo.showAs",
1469
+ "lightDevices[].sceneThree.sceneCode",
1470
+ "lightDevices[].sceneThree.bleCode",
1471
+ "lightDevices[].sceneThree.showAs",
1472
+ "lightDevices[].sceneFour.sceneCode",
1473
+ "lightDevices[].sceneFour.bleCode",
1474
+ "lightDevices[].sceneFour.showAs",
1475
+ "lightDevices[].musicMode.sceneCode",
1476
+ "lightDevices[].musicMode.bleCode",
1477
+ "lightDevices[].musicMode.showAs",
1478
+ "lightDevices[].musicModeTwo.sceneCode",
1479
+ "lightDevices[].musicModeTwo.bleCode",
1480
+ "lightDevices[].musicModeTwo.showAs",
1481
+ "lightDevices[].videoMode.sceneCode",
1482
+ "lightDevices[].videoMode.bleCode",
1483
+ "lightDevices[].videoMode.showAs",
1484
+ "lightDevices[].videoModeTwo.sceneCode",
1485
+ "lightDevices[].videoModeTwo.bleCode",
1486
+ "lightDevices[].videoModeTwo.showAs",
1487
+ "lightDevices[].diyMode.sceneCode",
1488
+ "lightDevices[].diyMode.bleCode",
1489
+ "lightDevices[].diyMode.showAs",
1490
+ "lightDevices[].diyModeTwo.sceneCode",
1491
+ "lightDevices[].diyModeTwo.bleCode",
1492
+ "lightDevices[].diyModeTwo.showAs",
1493
+ "lightDevices[].diyModeThree.sceneCode",
1494
+ "lightDevices[].diyModeThree.bleCode",
1495
+ "lightDevices[].diyModeThree.showAs",
1496
+ "lightDevices[].diyModeFour.sceneCode",
1497
+ "lightDevices[].diyModeFour.bleCode",
1498
+ "lightDevices[].diyModeFour.showAs",
1499
+ "lightDevices[].segmented.sceneCode",
1500
+ "lightDevices[].segmented.bleCode",
1501
+ "lightDevices[].segmented.showAs",
1502
+ "lightDevices[].segmentedTwo.sceneCode",
1503
+ "lightDevices[].segmentedTwo.bleCode",
1504
+ "lightDevices[].segmentedTwo.showAs",
1505
+ "lightDevices[].segmentedThree.sceneCode",
1506
+ "lightDevices[].segmentedThree.bleCode",
1507
+ "lightDevices[].segmentedThree.showAs",
1508
+ "lightDevices[].segmentedFour.sceneCode",
1509
+ "lightDevices[].segmentedFour.bleCode",
1510
+ "lightDevices[].segmentedFour.showAs"
1511
+ ]
1512
+ }
1513
+ ]
1514
+ }
1515
+ ]
1516
+ },
1517
+ {
1518
+ "key": "switchDevices",
1519
+ "expandable": true,
1520
+ "title": "Outlet Devices",
1521
+ "description": "Optional settings for Govee Outlet devices.",
1522
+ "add": "Add Another Device",
1523
+ "type": "array",
1524
+ "items": [
1525
+ {
1526
+ "type": "fieldset",
1527
+ "items": [
1528
+ "switchDevices[].label",
1529
+ "switchDevices[].deviceId",
1530
+ "switchDevices[].ignoreDevice",
1531
+ "switchDevices[].showAs",
1532
+ "switchDevices[].temperatureSource"
1533
+ ]
1534
+ }
1535
+ ]
1536
+ },
1537
+ {
1538
+ "key": "leakDevices",
1539
+ "expandable": true,
1540
+ "title": "Leak Sensor Devices",
1541
+ "description": "Optional settings for Govee Leak Sensor devices.",
1542
+ "add": "Add Another Device",
1543
+ "type": "array",
1544
+ "items": [
1545
+ {
1546
+ "type": "fieldset",
1547
+ "items": [
1548
+ "leakDevices[].label",
1549
+ "leakDevices[].deviceId",
1550
+ "leakDevices[].lowBattThreshold",
1551
+ "leakDevices[].ignoreDevice"
1552
+ ]
1553
+ }
1554
+ ]
1555
+ },
1556
+ {
1557
+ "key": "thermoDevices",
1558
+ "expandable": true,
1559
+ "title": "Thermo Sensor Devices",
1560
+ "description": "Optional settings for Govee Thermo-Hygrometer devices.",
1561
+ "add": "Add Another Device",
1562
+ "type": "array",
1563
+ "items": [
1564
+ {
1565
+ "type": "fieldset",
1566
+ "items": [
1567
+ "thermoDevices[].label",
1568
+ "thermoDevices[].deviceId",
1569
+ "thermoDevices[].ignoreDevice",
1570
+ "thermoDevices[].lowBattThreshold"
1571
+ ]
1572
+ }
1573
+ ]
1574
+ },
1575
+ {
1576
+ "key": "fanDevices",
1577
+ "expandable": true,
1578
+ "title": "Fan Devices",
1579
+ "description": "Optional settings for Govee Fan devices.",
1580
+ "add": "Add Another Device",
1581
+ "type": "array",
1582
+ "items": [
1583
+ {
1584
+ "type": "fieldset",
1585
+ "items": [
1586
+ "fanDevices[].label",
1587
+ "fanDevices[].deviceId",
1588
+ "fanDevices[].ignoreDevice"
1589
+ ]
1590
+ }
1591
+ ]
1592
+ },
1593
+ {
1594
+ "key": "heaterDevices",
1595
+ "expandable": true,
1596
+ "title": "Heater Devices",
1597
+ "description": "Optional settings for Govee Heater devices.",
1598
+ "add": "Add Another Device",
1599
+ "type": "array",
1600
+ "items": [
1601
+ {
1602
+ "type": "fieldset",
1603
+ "items": [
1604
+ "heaterDevices[].label",
1605
+ "heaterDevices[].deviceId",
1606
+ "heaterDevices[].ignoreDevice",
1607
+ "heaterDevices[].tempReporting"
1608
+ ]
1609
+ }
1610
+ ]
1611
+ },
1612
+ {
1613
+ "key": "humidifierDevices",
1614
+ "expandable": true,
1615
+ "title": "Humidifier Devices",
1616
+ "description": "Optional settings for Govee Humidifier devices.",
1617
+ "add": "Add Another Device",
1618
+ "type": "array",
1619
+ "items": [
1620
+ {
1621
+ "type": "fieldset",
1622
+ "items": [
1623
+ "humidifierDevices[].label",
1624
+ "humidifierDevices[].deviceId",
1625
+ "humidifierDevices[].ignoreDevice"
1626
+ ]
1627
+ }
1628
+ ]
1629
+ },
1630
+ {
1631
+ "key": "dehumidifierDevices",
1632
+ "expandable": true,
1633
+ "title": "Dehumidifier Devices",
1634
+ "description": "Optional settings for Govee Dehumidifier devices.",
1635
+ "add": "Add Another Device",
1636
+ "type": "array",
1637
+ "items": [
1638
+ {
1639
+ "type": "fieldset",
1640
+ "items": [
1641
+ "dehumidifierDevices[].label",
1642
+ "dehumidifierDevices[].deviceId",
1643
+ "dehumidifierDevices[].ignoreDevice"
1644
+ ]
1645
+ }
1646
+ ]
1647
+ },
1648
+ {
1649
+ "key": "purifierDevices",
1650
+ "expandable": true,
1651
+ "title": "Purifier Devices",
1652
+ "description": "Optional settings for Govee Purifier devices.",
1653
+ "add": "Add Another Device",
1654
+ "type": "array",
1655
+ "items": [
1656
+ {
1657
+ "type": "fieldset",
1658
+ "items": [
1659
+ "purifierDevices[].label",
1660
+ "purifierDevices[].deviceId",
1661
+ "purifierDevices[].ignoreDevice"
1662
+ ]
1663
+ }
1664
+ ]
1665
+ },
1666
+ {
1667
+ "key": "diffuserDevices",
1668
+ "expandable": true,
1669
+ "title": "Diffuser Devices",
1670
+ "description": "Optional settings for Govee Diffuser devices.",
1671
+ "add": "Add Another Device",
1672
+ "type": "array",
1673
+ "items": [
1674
+ {
1675
+ "type": "fieldset",
1676
+ "items": [
1677
+ "diffuserDevices[].label",
1678
+ "diffuserDevices[].deviceId",
1679
+ "diffuserDevices[].ignoreDevice"
1680
+ ]
1681
+ }
1682
+ ]
1683
+ },
1684
+ {
1685
+ "key": "kettleDevices",
1686
+ "expandable": true,
1687
+ "title": "Kettle Devices",
1688
+ "description": "Optional settings for Govee Kettle devices.",
1689
+ "add": "Add Another Device",
1690
+ "type": "array",
1691
+ "items": [
1692
+ {
1693
+ "type": "fieldset",
1694
+ "items": [
1695
+ "kettleDevices[].label",
1696
+ "kettleDevices[].deviceId",
1697
+ "kettleDevices[].ignoreDevice",
1698
+ "kettleDevices[].hideModeGreenTea",
1699
+ "kettleDevices[].hideModeOolongTea",
1700
+ "kettleDevices[].hideModeCoffee",
1701
+ "kettleDevices[].hideModeBlackTea",
1702
+ "kettleDevices[].showCustomMode1",
1703
+ "kettleDevices[].showCustomMode2"
1704
+ ]
1705
+ }
1706
+ ]
1707
+ },
1708
+ {
1709
+ "key": "iceMakerDevices",
1710
+ "expandable": true,
1711
+ "title": "Ice Maker Devices",
1712
+ "description": "Optional settings for Govee Ice Maker devices.",
1713
+ "add": "Add Another Device",
1714
+ "type": "array",
1715
+ "items": [
1716
+ {
1717
+ "type": "fieldset",
1718
+ "items": [
1719
+ "iceMakerDevices[].label",
1720
+ "iceMakerDevices[].deviceId",
1721
+ "iceMakerDevices[].ignoreDevice"
1722
+ ]
1723
+ }
1724
+ ]
1725
+ }
1726
+ ]
1727
+ }