@deconz-community/ddf-validator 2.0.0 → 2.2.0
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.
- package/dist/ddf-schema.json +1 -1
- package/dist/ddf-validator.cjs +1 -1
- package/dist/ddf-validator.d.ts +428 -40
- package/dist/ddf-validator.mjs +527 -292
- package/package.json +15 -15
package/dist/ddf-validator.d.ts
CHANGED
|
@@ -5,20 +5,29 @@ export type DDF = {
|
|
|
5
5
|
schema: "devcap1.schema.json";
|
|
6
6
|
"doc:path"?: string | undefined;
|
|
7
7
|
"doc:hdr"?: string | undefined;
|
|
8
|
+
/** Know issues for this device, markdown file. */
|
|
8
9
|
"md:known_issues"?: string[] | undefined;
|
|
9
|
-
|
|
10
|
+
/** Manufacturer name from Basic Cluster. */
|
|
11
|
+
manufacturername: ("$MF_BOSCH" | "$MF_IKEA" | "$MF_LUMI" | "$MF_LUTRON" | "$MF_PHILIPS" | "$MF_SAMJIN" | "$MF_SIGNIFY" | "$MF_TUYA" | "$MF_XIAOMI") | string | (("$MF_BOSCH" | "$MF_IKEA" | "$MF_LUMI" | "$MF_LUTRON" | "$MF_PHILIPS" | "$MF_SAMJIN" | "$MF_SIGNIFY" | "$MF_TUYA" | "$MF_XIAOMI") | string)[];
|
|
12
|
+
/** Model ID from Basic Cluster. */
|
|
10
13
|
modelid: string | string[];
|
|
14
|
+
/** Friendly name of the manufacturer. */
|
|
11
15
|
vendor?: string | undefined;
|
|
12
16
|
comment?: string | undefined;
|
|
17
|
+
/** Need to return true for the DDF be used. */
|
|
13
18
|
matchexpr?: string | undefined;
|
|
19
|
+
/** DDF path, useless, can be removed. */
|
|
14
20
|
path?: string | undefined;
|
|
21
|
+
/** Complements the model id to be shown in the UI. */
|
|
15
22
|
product?: string | undefined;
|
|
23
|
+
/** Sleeping devices can only receive when awake. */
|
|
16
24
|
sleeper?: boolean | undefined;
|
|
17
25
|
supportsMgmtBind?: boolean | undefined;
|
|
18
26
|
/** The code quality of the DDF file. */
|
|
19
27
|
status: "Draft" | "Bronze" | "Silver" | "Gold";
|
|
28
|
+
/** Devices section. */
|
|
20
29
|
subdevices: {
|
|
21
|
-
type: ("$TYPE_AIR_PURIFIER" | "$TYPE_AIR_QUALITY_SENSOR" | "$TYPE_ALARM_SENSOR" | "$
|
|
30
|
+
type: ("$TYPE_AIR_PURIFIER" | "$TYPE_AIR_QUALITY_SENSOR" | "$TYPE_ALARM_SENSOR" | "$TYPE_BATTERY_SENSOR" | "$TYPE_COLOR_DIMMABLE_LIGHT" | "$TYPE_COLOR_LIGHT" | "$TYPE_COLOR_TEMPERATURE_LIGHT" | "$TYPE_CONSUMPTION_SENSOR" | "$TYPE_DIMMABLE_LIGHT" | "$TYPE_DIMMABLE_PLUGIN_UNIT" | "$TYPE_DIMMER_SWITCH" | "$TYPE_DOOR_LOCK_CONTROLLER" | "$TYPE_DOOR_LOCK" | "$TYPE_EXTENDED_COLOR_LIGHT" | "$TYPE_FIRE_SENSOR" | "$TYPE_HUMIDITY_SENSOR" | "$TYPE_LIGHT_LEVEL_SENSOR" | "$TYPE_MOISTURE_SENSOR" | "$TYPE_ON_OFF_LIGHT" | "$TYPE_ON_OFF_OUTPUT" | "$TYPE_ON_OFF_PLUGIN_UNIT" | "$TYPE_OPEN_CLOSE_SENSOR" | "$TYPE_POWER_SENSOR" | "$TYPE_PRESENCE_SENSOR" | "$TYPE_PRESSURE_SENSOR" | "$TYPE_RANGE_EXTENDER" | "$TYPE_RELATIVE_ROTARY" | "$TYPE_SMART_PLUG" | "$TYPE_SPECTRAL_SENSOR" | "$TYPE_SWITCH" | "$TYPE_TEMPERATURE_SENSOR" | "$TYPE_THERMOSTAT" | "$TYPE_VIBRATION_SENSOR" | "$TYPE_WARNING_DEVICE" | "$TYPE_WATER_LEAK_SENSOR" | "$TYPE_WINDOW_COVERING_DEVICE" | "$TYPE_ZGP_SWITCH") | string;
|
|
22
31
|
restapi: "/lights" | "/sensors";
|
|
23
32
|
uuid: [
|
|
24
33
|
"$address.ext",
|
|
@@ -42,121 +51,311 @@ export type DDF = {
|
|
|
42
51
|
buttons?: any | undefined;
|
|
43
52
|
buttonevents?: any | undefined;
|
|
44
53
|
items: {
|
|
45
|
-
|
|
54
|
+
/** Item description, better to do not use it. */
|
|
46
55
|
description?: string | undefined;
|
|
56
|
+
/** TODO: What is this ? What the difference with description ? */
|
|
47
57
|
comment?: string | undefined;
|
|
58
|
+
/** Date of deprecation, if the item is deprecated, it's better to use the new one. */
|
|
59
|
+
deprecated?: string | undefined;
|
|
60
|
+
/** Data type of the item. */
|
|
61
|
+
datatype?: ("String" | "Bool" | "Int8" | "Int16" | "Int32" | "Int64" | "UInt8" | "UInt16" | "UInt32" | "UInt64" | "Array" | "Array[3]" | "ISO 8601 timestamp") | undefined;
|
|
62
|
+
/** Access mode for this item, some of them are not editable. */
|
|
63
|
+
access?: ("R" | "W" | "RW") | undefined;
|
|
64
|
+
/** Item visible on the API. */
|
|
48
65
|
public?: boolean | undefined;
|
|
66
|
+
/** TODO: What is this ? */
|
|
67
|
+
implicit?: boolean | undefined;
|
|
68
|
+
/** TODO: What is this ? */
|
|
69
|
+
managed?: boolean | undefined;
|
|
70
|
+
/** The device is considered awake when this item is set due a incoming command. */
|
|
71
|
+
awake?: boolean | undefined;
|
|
72
|
+
/** A static default value is fixed and can be not changed. */
|
|
49
73
|
static?: (string | number | boolean) | undefined;
|
|
74
|
+
/** Values range limit. */
|
|
50
75
|
range?: [
|
|
51
76
|
number,
|
|
52
77
|
number
|
|
53
78
|
] | undefined;
|
|
54
|
-
|
|
55
|
-
|
|
79
|
+
/** TODO: What is this ? */
|
|
80
|
+
virtual?: boolean | undefined;
|
|
81
|
+
/** Fonction used to read value. */
|
|
56
82
|
read?: ({
|
|
57
83
|
fn: "none";
|
|
58
84
|
} | {
|
|
85
|
+
/** Generic function to read ZCL attributes. */
|
|
59
86
|
fn?: undefined;
|
|
60
|
-
|
|
87
|
+
/** Attribute ID. */
|
|
88
|
+
at: string | string[];
|
|
89
|
+
/** Cluster ID. */
|
|
61
90
|
cl: string;
|
|
91
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
62
92
|
ep?: (string | number) | undefined;
|
|
93
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
63
94
|
mf?: string | undefined;
|
|
95
|
+
/** Javascript expression to transform the raw value. */
|
|
64
96
|
eval?: string | undefined;
|
|
65
97
|
} | {
|
|
98
|
+
/** Generic function to read ZCL attributes. */
|
|
66
99
|
fn: "zcl";
|
|
67
|
-
|
|
100
|
+
/** Attribute ID. */
|
|
101
|
+
at: string | string[];
|
|
102
|
+
/** Cluster ID. */
|
|
103
|
+
cl: string;
|
|
104
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
105
|
+
ep?: (string | number) | undefined;
|
|
106
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
107
|
+
mf?: string | undefined;
|
|
108
|
+
/** Javascript expression to transform the raw value. */
|
|
109
|
+
eval?: string | undefined;
|
|
110
|
+
/** Relative path of a Javascript .js file. */
|
|
111
|
+
script?: string | undefined;
|
|
112
|
+
} | {
|
|
113
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
114
|
+
fn: "zcl:attr";
|
|
115
|
+
/** String hex value or array of string hex values. */
|
|
116
|
+
at: string | string[];
|
|
117
|
+
/** Cluster ID. */
|
|
68
118
|
cl: string;
|
|
119
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
69
120
|
ep?: (string | number) | undefined;
|
|
121
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
70
122
|
mf?: string | undefined;
|
|
123
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
71
124
|
eval?: string | undefined;
|
|
125
|
+
/** Relative path of a Javascript .js file. */
|
|
126
|
+
script?: string | undefined;
|
|
72
127
|
} | {
|
|
128
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
129
|
+
fn: "zcl:cmd";
|
|
130
|
+
/** Cluster ID. */
|
|
131
|
+
cl: string;
|
|
132
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
133
|
+
ep?: (string | number) | undefined;
|
|
134
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
135
|
+
mf?: string | undefined;
|
|
136
|
+
/** Zigbee command. */
|
|
137
|
+
cmd?: string | undefined;
|
|
138
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
139
|
+
eval?: string | undefined;
|
|
140
|
+
/** Relative path of a Javascript .js file. */
|
|
141
|
+
script?: string | undefined;
|
|
142
|
+
} | {
|
|
143
|
+
/** Generic function to read all Tuya datapoints. It has no parameters. */
|
|
73
144
|
fn: "tuya";
|
|
74
145
|
}) | undefined;
|
|
146
|
+
/** Fonction used to parse incoming values. */
|
|
75
147
|
parse?: ({
|
|
148
|
+
/** Generic function to parse ZCL attributes and commands. */
|
|
76
149
|
fn?: undefined;
|
|
77
|
-
|
|
150
|
+
/** Attribute ID. */
|
|
151
|
+
at?: (string | string[]) | undefined;
|
|
152
|
+
/** Cluster ID. */
|
|
78
153
|
cl: string;
|
|
79
154
|
cppsrc?: string | undefined;
|
|
155
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
80
156
|
ep?: (string | number) | undefined;
|
|
157
|
+
/** Zigbee command. */
|
|
81
158
|
cmd?: string | undefined;
|
|
159
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
82
160
|
mf?: string | undefined;
|
|
161
|
+
/** Javascript expression to transform the raw value. */
|
|
83
162
|
eval?: string | undefined;
|
|
163
|
+
/** Relative path of a Javascript .js file. */
|
|
84
164
|
script?: string | undefined;
|
|
85
165
|
} | {
|
|
166
|
+
/** Generic function to parse ZCL attributes and commands. */
|
|
86
167
|
fn: "zcl";
|
|
87
|
-
|
|
168
|
+
/** Attribute ID. */
|
|
169
|
+
at?: (string | string[]) | undefined;
|
|
170
|
+
/** Cluster ID. */
|
|
88
171
|
cl: string;
|
|
89
172
|
cppsrc?: string | undefined;
|
|
173
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
90
174
|
ep?: (string | number) | undefined;
|
|
175
|
+
/** Zigbee command. */
|
|
91
176
|
cmd?: string | undefined;
|
|
177
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
92
178
|
mf?: string | undefined;
|
|
179
|
+
/** Javascript expression to transform the raw value. */
|
|
93
180
|
eval?: string | undefined;
|
|
181
|
+
/** Relative path of a Javascript .js file. */
|
|
94
182
|
script?: string | undefined;
|
|
95
183
|
} | {
|
|
184
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
185
|
+
fn: "zcl:attr";
|
|
186
|
+
/** String hex value or array of string hex values. */
|
|
187
|
+
at: string | string[];
|
|
188
|
+
/** Cluster ID. */
|
|
189
|
+
cl: string;
|
|
190
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
191
|
+
ep?: (string | number) | undefined;
|
|
192
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
193
|
+
mf?: string | undefined;
|
|
194
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
195
|
+
eval?: string | undefined;
|
|
196
|
+
/** Relative path of a Javascript .js file. */
|
|
197
|
+
script?: string | undefined;
|
|
198
|
+
} | {
|
|
199
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
200
|
+
fn: "zcl:cmd";
|
|
201
|
+
/** Cluster ID. */
|
|
202
|
+
cl: string;
|
|
203
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
204
|
+
ep?: (string | number) | undefined;
|
|
205
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
206
|
+
mf?: string | undefined;
|
|
207
|
+
/** Zigbee command. */
|
|
208
|
+
cmd?: string | undefined;
|
|
209
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
210
|
+
eval?: string | undefined;
|
|
211
|
+
/** Relative path of a Javascript .js file. */
|
|
212
|
+
script?: string | undefined;
|
|
213
|
+
} | {
|
|
214
|
+
/** Generic function to parse IAS ZONE status change notifications or zone status from read/report command. */
|
|
96
215
|
fn: "ias:zonestatus";
|
|
216
|
+
/** Sets the bitmask for Alert1 and Alert2 item of the IAS Zone status. */
|
|
97
217
|
mask?: (("alarm1" | "alarm2") | "alarm1,alarm2") | undefined;
|
|
98
218
|
} | {
|
|
219
|
+
/** Generic function to to convert number to string. */
|
|
99
220
|
fn: "numtostr";
|
|
221
|
+
/** The source item holding the number. */
|
|
100
222
|
srcitem: "state/airqualityppb" | "state/pm2_5";
|
|
101
|
-
|
|
223
|
+
/** Comparison operator (lt | le | eq | gt | ge) */
|
|
224
|
+
op: "lt" | "le" | "eq" | "gt" | "ge";
|
|
225
|
+
/** Array of (num, string) mappings */
|
|
102
226
|
to: any;
|
|
103
227
|
} | {
|
|
228
|
+
/** Specialized function to parse time, local and last set time from read/report commands of the time cluster and auto-sync time if needed. */
|
|
104
229
|
fn: "time";
|
|
105
230
|
} | {
|
|
231
|
+
/** Generic function to parse custom Xiaomi attributes and commands. */
|
|
106
232
|
fn: "xiaomi:special";
|
|
233
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
107
234
|
ep?: (string | number) | undefined;
|
|
235
|
+
/** Attribute ID. The attribute to parse, shall be 0xff01, 0xff02 or 0x00f7 */
|
|
108
236
|
at?: string | undefined;
|
|
237
|
+
/** A 8-bit string hex value. */
|
|
109
238
|
idx: string;
|
|
239
|
+
/** Javascript expression to transform the raw value. */
|
|
110
240
|
eval?: string | undefined;
|
|
241
|
+
/** Relative path of a Javascript .js file. */
|
|
111
242
|
script?: string | undefined;
|
|
112
243
|
} | {
|
|
244
|
+
/** Generic function to parse Tuya data. */
|
|
113
245
|
fn: "tuya";
|
|
246
|
+
/** Data point ID. 1-255 the datapoint ID. */
|
|
114
247
|
dpid: number;
|
|
248
|
+
/** Javascript expression to transform the raw value. */
|
|
115
249
|
eval?: string | undefined;
|
|
250
|
+
/** Relative path of a Javascript .js file. */
|
|
116
251
|
script?: string | undefined;
|
|
117
252
|
}) | undefined;
|
|
253
|
+
/** Fonction used to write value. */
|
|
118
254
|
write?: ({
|
|
119
255
|
fn: "none";
|
|
120
256
|
} | {
|
|
121
257
|
fn?: undefined;
|
|
258
|
+
/** Attribute ID. */
|
|
122
259
|
at?: (string | string[]) | undefined;
|
|
123
260
|
"state.timeout"?: number | undefined;
|
|
124
261
|
"change.timeout"?: number | undefined;
|
|
262
|
+
/** Cluster ID. */
|
|
125
263
|
cl: string;
|
|
264
|
+
/** Data type. */
|
|
126
265
|
dt: string;
|
|
266
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
127
267
|
ep?: (string | number) | undefined;
|
|
268
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
128
269
|
mf?: string | undefined;
|
|
270
|
+
/** Javascript expression to transform the raw value. */
|
|
129
271
|
eval?: string | undefined;
|
|
272
|
+
/** Relative path of a Javascript .js file. */
|
|
130
273
|
script?: string | undefined;
|
|
131
274
|
} | {
|
|
132
275
|
fn: "zcl";
|
|
276
|
+
/** Attribute ID. */
|
|
133
277
|
at?: (string | string[]) | undefined;
|
|
134
278
|
"state.timeout"?: number | undefined;
|
|
135
279
|
"change.timeout"?: number | undefined;
|
|
280
|
+
/** Cluster ID. */
|
|
281
|
+
cl: string;
|
|
282
|
+
/** Data type. */
|
|
283
|
+
dt: string;
|
|
284
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
285
|
+
ep?: (string | number) | undefined;
|
|
286
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
287
|
+
mf?: string | undefined;
|
|
288
|
+
/** Javascript expression to transform the raw value. */
|
|
289
|
+
eval?: string | undefined;
|
|
290
|
+
/** Relative path of a Javascript .js file. */
|
|
291
|
+
script?: string | undefined;
|
|
292
|
+
} | {
|
|
293
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
294
|
+
fn: "zcl:attr";
|
|
295
|
+
/** String hex value or array of string hex values. */
|
|
296
|
+
at: string | string[];
|
|
297
|
+
"state.timeout"?: number | undefined;
|
|
298
|
+
"change.timeout"?: number | undefined;
|
|
299
|
+
/** Cluster ID. */
|
|
300
|
+
cl: string;
|
|
301
|
+
/** Data type. */
|
|
302
|
+
dt: string;
|
|
303
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
304
|
+
ep?: (string | number) | undefined;
|
|
305
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
306
|
+
mf?: string | undefined;
|
|
307
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
308
|
+
eval?: string | undefined;
|
|
309
|
+
/** Relative path of a Javascript .js file. */
|
|
310
|
+
script?: string | undefined;
|
|
311
|
+
} | {
|
|
312
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
313
|
+
fn: "zcl:cmd";
|
|
314
|
+
/** Cluster ID. */
|
|
136
315
|
cl: string;
|
|
316
|
+
/** Data type. */
|
|
137
317
|
dt: string;
|
|
318
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
138
319
|
ep?: (string | number) | undefined;
|
|
320
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
139
321
|
mf?: string | undefined;
|
|
322
|
+
/** Zigbee command. */
|
|
323
|
+
cmd?: string | undefined;
|
|
324
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
140
325
|
eval?: string | undefined;
|
|
326
|
+
/** Relative path of a Javascript .js file. */
|
|
141
327
|
script?: string | undefined;
|
|
142
328
|
} | {
|
|
329
|
+
/** Generic function to write Tuya data. */
|
|
143
330
|
fn: "tuya";
|
|
331
|
+
/** Data point ID. 1-255 the datapoint ID. */
|
|
144
332
|
dpid: number;
|
|
333
|
+
/** Data type. */
|
|
145
334
|
dt: string;
|
|
335
|
+
/** Javascript expression to transform the raw value. */
|
|
146
336
|
eval?: string | undefined;
|
|
337
|
+
/** Relative path of a Javascript .js file. */
|
|
147
338
|
script?: string | undefined;
|
|
148
339
|
}) | undefined;
|
|
149
|
-
|
|
150
|
-
default?: unknown | undefined;
|
|
151
|
-
values?: unknown | undefined;
|
|
340
|
+
/** Refresh interval used for read fonction, NEED to be superior at value used in binding part. */
|
|
152
341
|
"refresh.interval"?: number | undefined;
|
|
342
|
+
/** TODO: What is this ? */
|
|
343
|
+
values?: unknown | undefined;
|
|
344
|
+
/** Defaut value. */
|
|
345
|
+
default?: unknown | undefined;
|
|
346
|
+
/** Item name. */
|
|
347
|
+
name: "state/windowopen" | "state/water" | "state/voltage" | "state/vibrationstrength" | "state/vibration" | "state/valve" | "state/utc" | "state/tiltangle" | "state/tilt" | "state/test" | "state/temperature" | "state/tampered" | "state/speed" | "state/seconds_remaining" | "state/sat" | "state/rotaryevent" | "state/replacefilter" | "state/reachable" | "state/production" | "state/pressure" | "state/presenceevent" | "state/presence" | "state/power" | "state/pm2_5" | "state/panel" | "state/orientation_z" | "state/orientation_y" | "state/orientation_x" | "state/orientation" | "state/open" | "state/on" | "state/mountingmodeactive" | "state/moisture" | "state/lux" | "state/lowbattery" | "state/lockstate" | "state/localtime" | "state/lightlevel" | "state/lift" | "state/lastupdated" | "state/lastset" | "state/lastcheckin" | "state/humidity" | "state/hue" | "state/heating" | "state/gradient" | "state/gesture" | "state/fire" | "state/filterruntime" | "state/expectedrotation" | "state/expectedeventduration" | "state/eventduration" | "state/errorcode" | "state/effect" | "state/deviceruntime" | "state/daylight" | "state/dark" | "state/current" | "state/current_P3" | "state/current_P2" | "state/current_P1" | "state/ct" | "state/consumption" | "state/consumption_2" | "state/y" | "state/x" | "state/colormode" | "state/charging" | "state/carbonmonoxide" | "state/buttonevent" | "state/bri" | "state/battery" | "state/angle" | "state/alert" | "state/alarm" | "state/airqualityppb" | "state/airquality" | "state/action" | "config/windowopen_set" | "config/windowcoveringtype" | "config/volume" | "config/usertest" | "config/unoccupiedheatsetpoint" | "config/tuya_unlock" | "config/triggerdistance" | "config/tholdoffset" | "config/tholddark" | "config/temperature" | "config/swingmode" | "config/speed" | "config/sensitivitymax" | "config/sensitivity" | "config/selftest" | "config/schedule_on" | "config/schedule" | "config/reversed" | "config/resetpresence" | "config/reachable" | "config/pulseconfiguration" | "config/preset" | "config/pending" | "config/on/startup" | "config/on" | "config/offset" | "config/mountingmode" | "config/mode" | "config/melody" | "config/locked" | "config/lock" | "config/ledindication" | "config/interfacemode" | "config/heatsetpoint" | "config/group" | "config/filterlifetime" | "config/fanmode" | "config/externalwindowopen" | "config/externalsensortemp" | "config/enrolled" | "config/duration" | "config/displayflipped" | "config/devicemode" | "config/delay" | "config/ctmin" | "config/ctmax" | "config/coolsetpoint" | "config/controlsequence" | "config/configured" | "config/colorcapabilities" | "config/color/xy/startup_y" | "config/color/xy/startup_x" | "config/color/gradient/reversed" | "config/color/execute_if_off" | "config/color/ct/startup" | "config/clickmode" | "config/checkin" | "config/bri/startup" | "config/bri/onoff_transitiontime" | "config/bri/on_level" | "config/bri/min" | "config/bri/max" | "config/bri/execute_if_off" | "config/battery" | "config/allowtouchlink" | "config/alert" | "cap/transition_block" | "cap/sleeper" | "cap/on/off_with_effect" | "cap/groups/not_supported" | "cap/color/xy/red_y" | "cap/color/xy/red_x" | "cap/color/xy/green_y" | "cap/color/xy/green_x" | "cap/color/xy/blue_y" | "cap/color/xy/blue_x" | "cap/color/gradient/styles" | "cap/color/gradient/pixel_length" | "cap/color/gradient/pixel_count" | "cap/color/gradient/max_segments" | "cap/color/gamut_type" | "cap/color/effects" | "cap/color/ct/min" | "cap/color/ct/max" | "cap/color/ct/computes_xy" | "cap/color/capabilities" | "cap/bri/move_with_onoff" | "cap/bri/min_dim_level" | "cap/alert/trigger_effect" | "attr/xiaomi" | "attr/uniqueid" | "attr/type" | "attr/swversion" | "attr/swconfigid" | "attr/productname" | "attr/productid" | "attr/powerup" | "attr/poweronlevel" | "attr/poweronct" | "attr/name" | "attr/modelid" | "attr/mode" | "attr/manufacturername" | "attr/lastseen" | "attr/lastannounced" | "attr/id";
|
|
153
348
|
}[];
|
|
154
349
|
example?: unknown | undefined;
|
|
155
350
|
}[];
|
|
351
|
+
/** Bindings section. */
|
|
156
352
|
bindings?: ({
|
|
157
353
|
bind: "unicast";
|
|
354
|
+
/** Source endpoint. */
|
|
158
355
|
"src.ep": string | number;
|
|
356
|
+
/** Destination endpoint, generaly 0x01. */
|
|
159
357
|
"dst.ep"?: (string | number) | undefined;
|
|
358
|
+
/** Cluster. */
|
|
160
359
|
cl: string;
|
|
161
360
|
report?: {
|
|
162
361
|
at: string;
|
|
@@ -168,7 +367,9 @@ export type DDF = {
|
|
|
168
367
|
}[] | undefined;
|
|
169
368
|
} | {
|
|
170
369
|
bind: "groupcast";
|
|
370
|
+
/** Source endpoint. */
|
|
171
371
|
"src.ep": string | number;
|
|
372
|
+
/** Cluster. */
|
|
172
373
|
cl: string;
|
|
173
374
|
"config.group": number;
|
|
174
375
|
})[] | undefined;
|
|
@@ -185,120 +386,303 @@ export type DDF = {
|
|
|
185
386
|
$schema?: string | undefined;
|
|
186
387
|
schema: "resourceitem1.schema.json";
|
|
187
388
|
id: string;
|
|
188
|
-
description
|
|
389
|
+
/** Item description, better to do not use it. */
|
|
390
|
+
description?: string | undefined;
|
|
391
|
+
/** TODO: What is this ? What the difference with description ? */
|
|
392
|
+
comment?: string | undefined;
|
|
393
|
+
/** Date of deprecation, if the item is deprecated, it's better to use the new one. */
|
|
189
394
|
deprecated?: string | undefined;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
395
|
+
/** Data type of the item. */
|
|
396
|
+
datatype?: ("String" | "Bool" | "Int8" | "Int16" | "Int32" | "Int64" | "UInt8" | "UInt16" | "UInt32" | "UInt64" | "Array" | "Array[3]" | "ISO 8601 timestamp") | undefined;
|
|
397
|
+
/** Access mode for this item, some of them are not editable. */
|
|
398
|
+
access?: ("R" | "W" | "RW") | undefined;
|
|
399
|
+
/** Item visible on the API. */
|
|
400
|
+
public?: boolean | undefined;
|
|
401
|
+
/** TODO: What is this ? */
|
|
193
402
|
implicit?: boolean | undefined;
|
|
403
|
+
/** TODO: What is this ? */
|
|
194
404
|
managed?: boolean | undefined;
|
|
195
|
-
|
|
405
|
+
/** The device is considered awake when this item is set due a incoming command. */
|
|
406
|
+
awake?: boolean | undefined;
|
|
407
|
+
/** A static default value is fixed and can be not changed. */
|
|
408
|
+
static?: (string | number | boolean) | undefined;
|
|
409
|
+
/** Values range limit. */
|
|
410
|
+
range?: [
|
|
411
|
+
number,
|
|
412
|
+
number
|
|
413
|
+
] | undefined;
|
|
414
|
+
/** TODO: What is this ? */
|
|
196
415
|
virtual?: boolean | undefined;
|
|
416
|
+
/** Fonction used to read value. */
|
|
417
|
+
read?: ({
|
|
418
|
+
fn: "none";
|
|
419
|
+
} | {
|
|
420
|
+
/** Generic function to read ZCL attributes. */
|
|
421
|
+
fn?: undefined;
|
|
422
|
+
/** Attribute ID. */
|
|
423
|
+
at: string | string[];
|
|
424
|
+
/** Cluster ID. */
|
|
425
|
+
cl: string;
|
|
426
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
427
|
+
ep?: (string | number) | undefined;
|
|
428
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
429
|
+
mf?: string | undefined;
|
|
430
|
+
/** Javascript expression to transform the raw value. */
|
|
431
|
+
eval?: string | undefined;
|
|
432
|
+
} | {
|
|
433
|
+
/** Generic function to read ZCL attributes. */
|
|
434
|
+
fn: "zcl";
|
|
435
|
+
/** Attribute ID. */
|
|
436
|
+
at: string | string[];
|
|
437
|
+
/** Cluster ID. */
|
|
438
|
+
cl: string;
|
|
439
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
440
|
+
ep?: (string | number) | undefined;
|
|
441
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
442
|
+
mf?: string | undefined;
|
|
443
|
+
/** Javascript expression to transform the raw value. */
|
|
444
|
+
eval?: string | undefined;
|
|
445
|
+
/** Relative path of a Javascript .js file. */
|
|
446
|
+
script?: string | undefined;
|
|
447
|
+
} | {
|
|
448
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
449
|
+
fn: "zcl:attr";
|
|
450
|
+
/** String hex value or array of string hex values. */
|
|
451
|
+
at: string | string[];
|
|
452
|
+
/** Cluster ID. */
|
|
453
|
+
cl: string;
|
|
454
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
455
|
+
ep?: (string | number) | undefined;
|
|
456
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
457
|
+
mf?: string | undefined;
|
|
458
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
459
|
+
eval?: string | undefined;
|
|
460
|
+
/** Relative path of a Javascript .js file. */
|
|
461
|
+
script?: string | undefined;
|
|
462
|
+
} | {
|
|
463
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
464
|
+
fn: "zcl:cmd";
|
|
465
|
+
/** Cluster ID. */
|
|
466
|
+
cl: string;
|
|
467
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
468
|
+
ep?: (string | number) | undefined;
|
|
469
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
470
|
+
mf?: string | undefined;
|
|
471
|
+
/** Zigbee command. */
|
|
472
|
+
cmd?: string | undefined;
|
|
473
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
474
|
+
eval?: string | undefined;
|
|
475
|
+
/** Relative path of a Javascript .js file. */
|
|
476
|
+
script?: string | undefined;
|
|
477
|
+
} | {
|
|
478
|
+
/** Generic function to read all Tuya datapoints. It has no parameters. */
|
|
479
|
+
fn: "tuya";
|
|
480
|
+
}) | undefined;
|
|
481
|
+
/** Fonction used to parse incoming values. */
|
|
197
482
|
parse?: ({
|
|
483
|
+
/** Generic function to parse ZCL attributes and commands. */
|
|
198
484
|
fn?: undefined;
|
|
199
|
-
|
|
485
|
+
/** Attribute ID. */
|
|
486
|
+
at?: (string | string[]) | undefined;
|
|
487
|
+
/** Cluster ID. */
|
|
200
488
|
cl: string;
|
|
201
489
|
cppsrc?: string | undefined;
|
|
490
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
202
491
|
ep?: (string | number) | undefined;
|
|
492
|
+
/** Zigbee command. */
|
|
203
493
|
cmd?: string | undefined;
|
|
494
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
204
495
|
mf?: string | undefined;
|
|
496
|
+
/** Javascript expression to transform the raw value. */
|
|
205
497
|
eval?: string | undefined;
|
|
498
|
+
/** Relative path of a Javascript .js file. */
|
|
206
499
|
script?: string | undefined;
|
|
207
500
|
} | {
|
|
501
|
+
/** Generic function to parse ZCL attributes and commands. */
|
|
208
502
|
fn: "zcl";
|
|
209
|
-
|
|
503
|
+
/** Attribute ID. */
|
|
504
|
+
at?: (string | string[]) | undefined;
|
|
505
|
+
/** Cluster ID. */
|
|
210
506
|
cl: string;
|
|
211
507
|
cppsrc?: string | undefined;
|
|
508
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
212
509
|
ep?: (string | number) | undefined;
|
|
510
|
+
/** Zigbee command. */
|
|
213
511
|
cmd?: string | undefined;
|
|
512
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
513
|
+
mf?: string | undefined;
|
|
514
|
+
/** Javascript expression to transform the raw value. */
|
|
515
|
+
eval?: string | undefined;
|
|
516
|
+
/** Relative path of a Javascript .js file. */
|
|
517
|
+
script?: string | undefined;
|
|
518
|
+
} | {
|
|
519
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
520
|
+
fn: "zcl:attr";
|
|
521
|
+
/** String hex value or array of string hex values. */
|
|
522
|
+
at: string | string[];
|
|
523
|
+
/** Cluster ID. */
|
|
524
|
+
cl: string;
|
|
525
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
526
|
+
ep?: (string | number) | undefined;
|
|
527
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
214
528
|
mf?: string | undefined;
|
|
529
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
215
530
|
eval?: string | undefined;
|
|
531
|
+
/** Relative path of a Javascript .js file. */
|
|
216
532
|
script?: string | undefined;
|
|
217
533
|
} | {
|
|
534
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
535
|
+
fn: "zcl:cmd";
|
|
536
|
+
/** Cluster ID. */
|
|
537
|
+
cl: string;
|
|
538
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
539
|
+
ep?: (string | number) | undefined;
|
|
540
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
541
|
+
mf?: string | undefined;
|
|
542
|
+
/** Zigbee command. */
|
|
543
|
+
cmd?: string | undefined;
|
|
544
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
545
|
+
eval?: string | undefined;
|
|
546
|
+
/** Relative path of a Javascript .js file. */
|
|
547
|
+
script?: string | undefined;
|
|
548
|
+
} | {
|
|
549
|
+
/** Generic function to parse IAS ZONE status change notifications or zone status from read/report command. */
|
|
218
550
|
fn: "ias:zonestatus";
|
|
551
|
+
/** Sets the bitmask for Alert1 and Alert2 item of the IAS Zone status. */
|
|
219
552
|
mask?: (("alarm1" | "alarm2") | "alarm1,alarm2") | undefined;
|
|
220
553
|
} | {
|
|
554
|
+
/** Generic function to to convert number to string. */
|
|
221
555
|
fn: "numtostr";
|
|
556
|
+
/** The source item holding the number. */
|
|
222
557
|
srcitem: "state/airqualityppb" | "state/pm2_5";
|
|
223
|
-
|
|
558
|
+
/** Comparison operator (lt | le | eq | gt | ge) */
|
|
559
|
+
op: "lt" | "le" | "eq" | "gt" | "ge";
|
|
560
|
+
/** Array of (num, string) mappings */
|
|
224
561
|
to: any;
|
|
225
562
|
} | {
|
|
563
|
+
/** Specialized function to parse time, local and last set time from read/report commands of the time cluster and auto-sync time if needed. */
|
|
226
564
|
fn: "time";
|
|
227
565
|
} | {
|
|
566
|
+
/** Generic function to parse custom Xiaomi attributes and commands. */
|
|
228
567
|
fn: "xiaomi:special";
|
|
568
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
229
569
|
ep?: (string | number) | undefined;
|
|
570
|
+
/** Attribute ID. The attribute to parse, shall be 0xff01, 0xff02 or 0x00f7 */
|
|
230
571
|
at?: string | undefined;
|
|
572
|
+
/** A 8-bit string hex value. */
|
|
231
573
|
idx: string;
|
|
574
|
+
/** Javascript expression to transform the raw value. */
|
|
232
575
|
eval?: string | undefined;
|
|
576
|
+
/** Relative path of a Javascript .js file. */
|
|
233
577
|
script?: string | undefined;
|
|
234
578
|
} | {
|
|
579
|
+
/** Generic function to parse Tuya data. */
|
|
235
580
|
fn: "tuya";
|
|
581
|
+
/** Data point ID. 1-255 the datapoint ID. */
|
|
236
582
|
dpid: number;
|
|
583
|
+
/** Javascript expression to transform the raw value. */
|
|
237
584
|
eval?: string | undefined;
|
|
585
|
+
/** Relative path of a Javascript .js file. */
|
|
238
586
|
script?: string | undefined;
|
|
239
587
|
}) | undefined;
|
|
240
|
-
|
|
588
|
+
/** Fonction used to write value. */
|
|
589
|
+
write?: ({
|
|
241
590
|
fn: "none";
|
|
242
591
|
} | {
|
|
243
592
|
fn?: undefined;
|
|
593
|
+
/** Attribute ID. */
|
|
244
594
|
at?: (string | string[]) | undefined;
|
|
595
|
+
"state.timeout"?: number | undefined;
|
|
596
|
+
"change.timeout"?: number | undefined;
|
|
597
|
+
/** Cluster ID. */
|
|
245
598
|
cl: string;
|
|
599
|
+
/** Data type. */
|
|
600
|
+
dt: string;
|
|
601
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
246
602
|
ep?: (string | number) | undefined;
|
|
603
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
247
604
|
mf?: string | undefined;
|
|
605
|
+
/** Javascript expression to transform the raw value. */
|
|
248
606
|
eval?: string | undefined;
|
|
607
|
+
/** Relative path of a Javascript .js file. */
|
|
608
|
+
script?: string | undefined;
|
|
249
609
|
} | {
|
|
250
610
|
fn: "zcl";
|
|
611
|
+
/** Attribute ID. */
|
|
251
612
|
at?: (string | string[]) | undefined;
|
|
613
|
+
"state.timeout"?: number | undefined;
|
|
614
|
+
"change.timeout"?: number | undefined;
|
|
615
|
+
/** Cluster ID. */
|
|
252
616
|
cl: string;
|
|
617
|
+
/** Data type. */
|
|
618
|
+
dt: string;
|
|
619
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
253
620
|
ep?: (string | number) | undefined;
|
|
621
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
254
622
|
mf?: string | undefined;
|
|
623
|
+
/** Javascript expression to transform the raw value. */
|
|
255
624
|
eval?: string | undefined;
|
|
625
|
+
/** Relative path of a Javascript .js file. */
|
|
626
|
+
script?: string | undefined;
|
|
256
627
|
} | {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
} | {
|
|
262
|
-
fn?: undefined;
|
|
263
|
-
at?: (string | string[]) | undefined;
|
|
628
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
629
|
+
fn: "zcl:attr";
|
|
630
|
+
/** String hex value or array of string hex values. */
|
|
631
|
+
at: string | string[];
|
|
264
632
|
"state.timeout"?: number | undefined;
|
|
265
633
|
"change.timeout"?: number | undefined;
|
|
634
|
+
/** Cluster ID. */
|
|
266
635
|
cl: string;
|
|
636
|
+
/** Data type. */
|
|
267
637
|
dt: string;
|
|
638
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
268
639
|
ep?: (string | number) | undefined;
|
|
640
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
269
641
|
mf?: string | undefined;
|
|
642
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
270
643
|
eval?: string | undefined;
|
|
644
|
+
/** Relative path of a Javascript .js file. */
|
|
271
645
|
script?: string | undefined;
|
|
272
646
|
} | {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
"change.timeout"?: number | undefined;
|
|
647
|
+
/** Generic function to parse ZCL values from read/report commands. */
|
|
648
|
+
fn: "zcl:cmd";
|
|
649
|
+
/** Cluster ID. */
|
|
277
650
|
cl: string;
|
|
651
|
+
/** Data type. */
|
|
278
652
|
dt: string;
|
|
653
|
+
/** Endpoint, 255 means any endpoint, 0 means auto selected from subdevice. */
|
|
279
654
|
ep?: (string | number) | undefined;
|
|
655
|
+
/** Manufacturer code, must be set to 0x0000 for non manufacturer specific commands. */
|
|
280
656
|
mf?: string | undefined;
|
|
657
|
+
/** Zigbee command. */
|
|
658
|
+
cmd?: string | undefined;
|
|
659
|
+
/** Javascript expression to transform the attribute value to the Item value. */
|
|
281
660
|
eval?: string | undefined;
|
|
661
|
+
/** Relative path of a Javascript .js file. */
|
|
282
662
|
script?: string | undefined;
|
|
283
663
|
} | {
|
|
664
|
+
/** Generic function to write Tuya data. */
|
|
284
665
|
fn: "tuya";
|
|
666
|
+
/** Data point ID. 1-255 the datapoint ID. */
|
|
285
667
|
dpid: number;
|
|
668
|
+
/** Data type. */
|
|
286
669
|
dt: string;
|
|
670
|
+
/** Javascript expression to transform the raw value. */
|
|
287
671
|
eval?: string | undefined;
|
|
672
|
+
/** Relative path of a Javascript .js file. */
|
|
288
673
|
script?: string | undefined;
|
|
289
674
|
}) | undefined;
|
|
675
|
+
/** Refresh interval used for read fonction, NEED to be superior at value used in binding part. */
|
|
290
676
|
"refresh.interval"?: number | undefined;
|
|
677
|
+
/** TODO: What is this ? */
|
|
291
678
|
values?: unknown | undefined;
|
|
292
|
-
|
|
293
|
-
number,
|
|
294
|
-
number
|
|
295
|
-
] | undefined;
|
|
679
|
+
/** Defaut value. */
|
|
296
680
|
default?: unknown | undefined;
|
|
297
681
|
} | {
|
|
298
682
|
$schema?: string | undefined;
|
|
299
683
|
schema: "subdevice1.schema.json";
|
|
300
|
-
type: "$TYPE_AIR_PURIFIER" | "$TYPE_AIR_QUALITY_SENSOR" | "$TYPE_ALARM_SENSOR" | "$
|
|
301
|
-
name:
|
|
684
|
+
type: ("$TYPE_AIR_PURIFIER" | "$TYPE_AIR_QUALITY_SENSOR" | "$TYPE_ALARM_SENSOR" | "$TYPE_BATTERY_SENSOR" | "$TYPE_COLOR_DIMMABLE_LIGHT" | "$TYPE_COLOR_LIGHT" | "$TYPE_COLOR_TEMPERATURE_LIGHT" | "$TYPE_CONSUMPTION_SENSOR" | "$TYPE_DIMMABLE_LIGHT" | "$TYPE_DIMMABLE_PLUGIN_UNIT" | "$TYPE_DIMMER_SWITCH" | "$TYPE_DOOR_LOCK_CONTROLLER" | "$TYPE_DOOR_LOCK" | "$TYPE_EXTENDED_COLOR_LIGHT" | "$TYPE_FIRE_SENSOR" | "$TYPE_HUMIDITY_SENSOR" | "$TYPE_LIGHT_LEVEL_SENSOR" | "$TYPE_MOISTURE_SENSOR" | "$TYPE_ON_OFF_LIGHT" | "$TYPE_ON_OFF_OUTPUT" | "$TYPE_ON_OFF_PLUGIN_UNIT" | "$TYPE_OPEN_CLOSE_SENSOR" | "$TYPE_POWER_SENSOR" | "$TYPE_PRESENCE_SENSOR" | "$TYPE_PRESSURE_SENSOR" | "$TYPE_RANGE_EXTENDER" | "$TYPE_RELATIVE_ROTARY" | "$TYPE_SMART_PLUG" | "$TYPE_SPECTRAL_SENSOR" | "$TYPE_SWITCH" | "$TYPE_TEMPERATURE_SENSOR" | "$TYPE_THERMOSTAT" | "$TYPE_VIBRATION_SENSOR" | "$TYPE_WARNING_DEVICE" | "$TYPE_WATER_LEAK_SENSOR" | "$TYPE_WINDOW_COVERING_DEVICE" | "$TYPE_ZGP_SWITCH") | string;
|
|
685
|
+
name: string;
|
|
302
686
|
restapi: "/lights" | "/sensors";
|
|
303
687
|
order: number;
|
|
304
688
|
uuid: [
|
|
@@ -309,11 +693,15 @@ export type DDF = {
|
|
|
309
693
|
string,
|
|
310
694
|
string
|
|
311
695
|
];
|
|
312
|
-
items: ("state/windowopen" | "state/water" | "state/voltage" | "state/vibrationstrength" | "state/vibration" | "state/valve" | "state/utc" | "state/tiltangle" | "state/tilt" | "state/test" | "state/temperature" | "state/tampered" | "state/speed" | "state/seconds_remaining" | "state/sat" | "state/rotaryevent" | "state/replacefilter" | "state/reachable" | "state/production" | "state/pressure" | "state/presenceevent" | "state/presence" | "state/power" | "state/pm2_5" | "state/panel" | "state/orientation_z" | "state/orientation_y" | "state/orientation_x" | "state/orientation" | "state/open" | "state/on" | "state/mountingmodeactive" | "state/lux" | "state/lowbattery" | "state/lockstate" | "state/localtime" | "state/lightlevel" | "state/lift" | "state/lastupdated" | "state/lastset" | "state/lastcheckin" | "state/humidity" | "state/hue" | "state/heating" | "state/gradient" | "state/gesture" | "state/fire" | "state/filterruntime" | "state/expectedrotation" | "state/expectedeventduration" | "state/eventduration" | "state/errorcode" | "state/effect" | "state/deviceruntime" | "state/daylight" | "state/dark" | "state/current" | "state/current_P3" | "state/current_P2" | "state/current_P1" | "state/ct" | "state/consumption" | "state/consumption_2" | "state/y" | "state/x" | "state/colormode" | "state/charging" | "state/carbonmonoxide" | "state/buttonevent" | "state/bri" | "state/battery" | "state/angle" | "state/alert" | "state/alarm" | "state/airqualityppb" | "state/airquality" | "state/action" | "config/windowopen_set" | "config/windowcoveringtype" | "config/usertest" | "config/unoccupiedheatsetpoint" | "config/triggerdistance" | "config/tholdoffset" | "config/tholddark" | "config/temperature" | "config/swingmode" | "config/sensitivitymax" | "config/sensitivity" | "config/selftest" | "config/schedule_on" | "config/schedule" | "config/resetpresence" | "config/reachable" | "config/pulseconfiguration" | "config/preset" | "config/pending" | "config/on/startup" | "config/on" | "config/offset" | "config/mountingmode" | "config/mode" | "config/locked" | "config/lock" | "config/ledindication" | "config/interfacemode" | "config/heatsetpoint" | "config/group" | "config/filterlifetime" | "config/fanmode" | "config/externalwindowopen" | "config/externalsensortemp" | "config/enrolled" | "config/duration" | "config/displayflipped" | "config/devicemode" | "config/delay" | "config/ctmin" | "config/ctmax" | "config/coolsetpoint" | "config/controlsequence" | "config/configured" | "config/colorcapabilities" | "config/color/xy/startup_y" | "config/color/xy/startup_x" | "config/color/gradient/reversed" | "config/color/execute_if_off" | "config/color/ct/startup" | "config/clickmode" | "config/checkin" | "config/bri/startup" | "config/bri/onoff_transitiontime" | "config/bri/on_level" | "config/bri/min" | "config/bri/max" | "config/bri/execute_if_off" | "config/battery" | "config/allowtouchlink" | "config/alert" | "cap/transition_block" | "cap/sleeper" | "cap/on/off_with_effect" | "cap/groups/not_supported" | "cap/color/xy/red_y" | "cap/color/xy/red_x" | "cap/color/xy/green_y" | "cap/color/xy/green_x" | "cap/color/xy/blue_y" | "cap/color/xy/blue_x" | "cap/color/gradient/styles" | "cap/color/gradient/pixel_length" | "cap/color/gradient/pixel_count" | "cap/color/gradient/max_segments" | "cap/color/gamut_type" | "cap/color/effects" | "cap/color/ct/min" | "cap/color/ct/max" | "cap/color/ct/computes_xy" | "cap/color/capabilities" | "cap/bri/move_with_onoff" | "cap/bri/min_dim_level" | "cap/alert/trigger_effect" | "attr/uniqueid" | "attr/type" | "attr/swversion" | "attr/swconfigid" | "attr/productname" | "attr/productid" | "attr/powerup" | "attr/poweronlevel" | "attr/poweronct" | "attr/name" | "attr/modelid" | "attr/mode" | "attr/manufacturername" | "attr/lastseen" | "attr/lastannounced" | "attr/id")[];
|
|
696
|
+
items: ("state/windowopen" | "state/water" | "state/voltage" | "state/vibrationstrength" | "state/vibration" | "state/valve" | "state/utc" | "state/tiltangle" | "state/tilt" | "state/test" | "state/temperature" | "state/tampered" | "state/speed" | "state/seconds_remaining" | "state/sat" | "state/rotaryevent" | "state/replacefilter" | "state/reachable" | "state/production" | "state/pressure" | "state/presenceevent" | "state/presence" | "state/power" | "state/pm2_5" | "state/panel" | "state/orientation_z" | "state/orientation_y" | "state/orientation_x" | "state/orientation" | "state/open" | "state/on" | "state/mountingmodeactive" | "state/moisture" | "state/lux" | "state/lowbattery" | "state/lockstate" | "state/localtime" | "state/lightlevel" | "state/lift" | "state/lastupdated" | "state/lastset" | "state/lastcheckin" | "state/humidity" | "state/hue" | "state/heating" | "state/gradient" | "state/gesture" | "state/fire" | "state/filterruntime" | "state/expectedrotation" | "state/expectedeventduration" | "state/eventduration" | "state/errorcode" | "state/effect" | "state/deviceruntime" | "state/daylight" | "state/dark" | "state/current" | "state/current_P3" | "state/current_P2" | "state/current_P1" | "state/ct" | "state/consumption" | "state/consumption_2" | "state/y" | "state/x" | "state/colormode" | "state/charging" | "state/carbonmonoxide" | "state/buttonevent" | "state/bri" | "state/battery" | "state/angle" | "state/alert" | "state/alarm" | "state/airqualityppb" | "state/airquality" | "state/action" | "config/windowopen_set" | "config/windowcoveringtype" | "config/volume" | "config/usertest" | "config/unoccupiedheatsetpoint" | "config/tuya_unlock" | "config/triggerdistance" | "config/tholdoffset" | "config/tholddark" | "config/temperature" | "config/swingmode" | "config/speed" | "config/sensitivitymax" | "config/sensitivity" | "config/selftest" | "config/schedule_on" | "config/schedule" | "config/reversed" | "config/resetpresence" | "config/reachable" | "config/pulseconfiguration" | "config/preset" | "config/pending" | "config/on/startup" | "config/on" | "config/offset" | "config/mountingmode" | "config/mode" | "config/melody" | "config/locked" | "config/lock" | "config/ledindication" | "config/interfacemode" | "config/heatsetpoint" | "config/group" | "config/filterlifetime" | "config/fanmode" | "config/externalwindowopen" | "config/externalsensortemp" | "config/enrolled" | "config/duration" | "config/displayflipped" | "config/devicemode" | "config/delay" | "config/ctmin" | "config/ctmax" | "config/coolsetpoint" | "config/controlsequence" | "config/configured" | "config/colorcapabilities" | "config/color/xy/startup_y" | "config/color/xy/startup_x" | "config/color/gradient/reversed" | "config/color/execute_if_off" | "config/color/ct/startup" | "config/clickmode" | "config/checkin" | "config/bri/startup" | "config/bri/onoff_transitiontime" | "config/bri/on_level" | "config/bri/min" | "config/bri/max" | "config/bri/execute_if_off" | "config/battery" | "config/allowtouchlink" | "config/alert" | "cap/transition_block" | "cap/sleeper" | "cap/on/off_with_effect" | "cap/groups/not_supported" | "cap/color/xy/red_y" | "cap/color/xy/red_x" | "cap/color/xy/green_y" | "cap/color/xy/green_x" | "cap/color/xy/blue_y" | "cap/color/xy/blue_x" | "cap/color/gradient/styles" | "cap/color/gradient/pixel_length" | "cap/color/gradient/pixel_count" | "cap/color/gradient/max_segments" | "cap/color/gamut_type" | "cap/color/effects" | "cap/color/ct/min" | "cap/color/ct/max" | "cap/color/ct/computes_xy" | "cap/color/capabilities" | "cap/bri/move_with_onoff" | "cap/bri/min_dim_level" | "cap/alert/trigger_effect" | "attr/xiaomi" | "attr/uniqueid" | "attr/type" | "attr/swversion" | "attr/swconfigid" | "attr/productname" | "attr/productid" | "attr/powerup" | "attr/poweronlevel" | "attr/poweronct" | "attr/name" | "attr/modelid" | "attr/mode" | "attr/manufacturername" | "attr/lastseen" | "attr/lastannounced" | "attr/id")[];
|
|
313
697
|
};
|
|
314
698
|
|
|
699
|
+
import type { z } from 'zod'
|
|
700
|
+
import type { resourceSchema } from './schema'
|
|
701
|
+
|
|
315
702
|
export interface GenericsData {
|
|
316
703
|
attributes: string[]
|
|
704
|
+
resources: Record<string, Omit<z.infer<ReturnType<typeof resourceSchema>>, 'schema' | 'id'>>
|
|
317
705
|
manufacturers: Record<string, string>
|
|
318
706
|
deviceTypes: Record<string, string>
|
|
319
707
|
}
|