zigbee-herdsman-converters 25.115.0 → 25.116.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/converters/fromZigbee.d.ts.map +1 -1
  3. package/dist/converters/fromZigbee.js +10 -0
  4. package/dist/converters/fromZigbee.js.map +1 -1
  5. package/dist/converters/toZigbee.d.ts +4 -0
  6. package/dist/converters/toZigbee.d.ts.map +1 -1
  7. package/dist/converters/toZigbee.js +36 -4
  8. package/dist/converters/toZigbee.js.map +1 -1
  9. package/dist/devices/ecodim.d.ts.map +1 -1
  10. package/dist/devices/ecodim.js +9 -0
  11. package/dist/devices/ecodim.js.map +1 -1
  12. package/dist/devices/halemeier.d.ts.map +1 -1
  13. package/dist/devices/halemeier.js +8 -1
  14. package/dist/devices/halemeier.js.map +1 -1
  15. package/dist/devices/ikea.js +3 -3
  16. package/dist/devices/ikea.js.map +1 -1
  17. package/dist/devices/index.d.ts.map +1 -1
  18. package/dist/devices/index.js +2 -0
  19. package/dist/devices/index.js.map +1 -1
  20. package/dist/devices/inovelli.d.ts.map +1 -1
  21. package/dist/devices/inovelli.js +283 -47
  22. package/dist/devices/inovelli.js.map +1 -1
  23. package/dist/devices/lds.d.ts.map +1 -1
  24. package/dist/devices/lds.js +7 -0
  25. package/dist/devices/lds.js.map +1 -1
  26. package/dist/devices/slacky_diy.d.ts.map +1 -1
  27. package/dist/devices/slacky_diy.js +230 -260
  28. package/dist/devices/slacky_diy.js.map +1 -1
  29. package/dist/devices/sunricher.d.ts.map +1 -1
  30. package/dist/devices/sunricher.js +1 -2
  31. package/dist/devices/sunricher.js.map +1 -1
  32. package/dist/devices/tis_control.d.ts +3 -0
  33. package/dist/devices/tis_control.d.ts.map +1 -0
  34. package/dist/devices/tis_control.js +47 -0
  35. package/dist/devices/tis_control.js.map +1 -0
  36. package/dist/devices/tuya.d.ts.map +1 -1
  37. package/dist/devices/tuya.js +64 -2
  38. package/dist/devices/tuya.js.map +1 -1
  39. package/dist/lib/legacy.d.ts.map +1 -1
  40. package/dist/lib/legacy.js +12 -1
  41. package/dist/lib/legacy.js.map +1 -1
  42. package/dist/models-index.json +1 -1
  43. package/package.json +1 -1
@@ -96,10 +96,12 @@ const individualLedEffects = {
96
96
  clear_effect: 255,
97
97
  };
98
98
  const mmWaveControlCommands = {
99
+ reset_mmwave_module: 0,
99
100
  set_interference: 1,
101
+ query_areas: 2,
100
102
  clear_interference: 3,
101
103
  reset_detection_area: 4,
102
- reset_mmwave_module: 0,
104
+ clear_stay_areas: 5,
103
105
  };
104
106
  const INOVELLI_CLUSTER_NAME = "manuSpecificInovelli";
105
107
  const INOVELLI_MMWAVE_CLUSTER_NAME = "manuSpecificInovelliMMWave";
@@ -230,41 +232,103 @@ const inovelliExtend = {
230
232
  },
231
233
  commandsResponse: {},
232
234
  }),
233
- addCustomMMWaveClusterInovelli: () => m.deviceAddCustomCluster(INOVELLI_MMWAVE_CLUSTER_NAME, {
234
- ID: 64562, // 0xfc32
235
- manufacturerCode: 0x122f,
236
- attributes: {
237
- mmWaveHoldTime: { ID: 0x0072, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
238
- mmWaveDetectSensitivity: { ID: 0x0070, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
239
- mmWaveDetectTrigger: { ID: 0x0071, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
240
- mmWaveTargetInfoReport: { ID: 0x006b, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
241
- mmWaveStayLife: { ID: 0x006c, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
242
- mmWaveVersion: { ID: 0x0073, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
243
- mmWaveHeightMin: { ID: 0x0065, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
244
- mmWaveHeightMax: { ID: 0x0066, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
245
- mmWaveWidthMin: { ID: 0x0067, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
246
- mmWaveWidthMax: { ID: 0x0068, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
247
- mmWaveDepthMin: { ID: 0x0069, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
248
- mmWaveDepthMax: { ID: 0x006a, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
249
- },
250
- commands: {
251
- mmWaveControl: {
252
- ID: 0,
253
- parameters: [{ name: "controlID", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff }],
235
+ addCustomMMWaveClusterInovelli: () => {
236
+ const mmWaveCommandAreaParameters = [
237
+ { name: "areaId", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 3 },
238
+ { name: "xMin", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
239
+ { name: "xMax", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
240
+ { name: "yMin", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
241
+ { name: "yMax", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
242
+ { name: "zMin", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
243
+ { name: "zMax", type: zigbee_herdsman_1.Zcl.DataType.INT16, min: -600, max: 600 },
244
+ ];
245
+ const mmWaveCommandResponseAreaParameters = [
246
+ { name: "count", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
247
+ { name: "xMin1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
248
+ { name: "xMax1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
249
+ { name: "yMin1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
250
+ { name: "yMax1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
251
+ { name: "zMin1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
252
+ { name: "zMax1", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
253
+ { name: "xMin2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
254
+ { name: "xMax2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
255
+ { name: "yMin2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
256
+ { name: "yMax2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
257
+ { name: "zMin2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
258
+ { name: "zMax2", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
259
+ { name: "xMin3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
260
+ { name: "xMax3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
261
+ { name: "yMin3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
262
+ { name: "yMax3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
263
+ { name: "zMin3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
264
+ { name: "zMax3", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
265
+ { name: "xMin4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
266
+ { name: "xMax4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
267
+ { name: "yMin4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
268
+ { name: "yMax4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
269
+ { name: "zMin4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
270
+ { name: "zMax4", type: zigbee_herdsman_1.Zcl.DataType.INT16 },
271
+ ];
272
+ return m.deviceAddCustomCluster(INOVELLI_MMWAVE_CLUSTER_NAME, {
273
+ ID: 64562, // 0xfc32
274
+ manufacturerCode: 0x122f,
275
+ attributes: {
276
+ mmWaveHoldTime: { ID: 0x0072, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
277
+ mmWaveDetectSensitivity: { ID: 0x0070, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
278
+ mmWaveDetectTrigger: { ID: 0x0071, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
279
+ mmWaveTargetInfoReport: { ID: 0x006b, type: zigbee_herdsman_1.Zcl.DataType.UINT8, write: true, max: 0xff },
280
+ mmWaveStayLife: { ID: 0x006c, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
281
+ mmWaveVersion: { ID: 0x0073, type: zigbee_herdsman_1.Zcl.DataType.UINT32, write: true, max: 0xffffffff },
282
+ mmWaveHeightMin: { ID: 0x0065, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
283
+ mmWaveHeightMax: { ID: 0x0066, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
284
+ mmWaveWidthMin: { ID: 0x0067, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
285
+ mmWaveWidthMax: { ID: 0x0068, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
286
+ mmWaveDepthMin: { ID: 0x0069, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
287
+ mmWaveDepthMax: { ID: 0x006a, type: zigbee_herdsman_1.Zcl.DataType.INT16, write: true, min: -32768 },
254
288
  },
255
- },
256
- commandsResponse: {
257
- anyoneInReportingArea: {
258
- ID: 0,
259
- parameters: [
260
- { name: "area1", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
261
- { name: "area2", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
262
- { name: "area3", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
263
- { name: "area4", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
264
- ],
289
+ commands: {
290
+ mmWaveControl: {
291
+ ID: 0,
292
+ parameters: [{ name: "controlID", type: zigbee_herdsman_1.Zcl.DataType.UINT8, max: 0xff }],
293
+ },
294
+ setInterferenceArea: {
295
+ ID: 1,
296
+ parameters: mmWaveCommandAreaParameters,
297
+ },
298
+ setDetectionArea: {
299
+ ID: 2,
300
+ parameters: mmWaveCommandAreaParameters,
301
+ },
302
+ setStayArea: {
303
+ ID: 3,
304
+ parameters: mmWaveCommandAreaParameters,
305
+ },
265
306
  },
266
- },
267
- }),
307
+ commandsResponse: {
308
+ anyoneInReportingArea: {
309
+ ID: 0,
310
+ parameters: [
311
+ { name: "area1", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
312
+ { name: "area2", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
313
+ { name: "area3", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
314
+ { name: "area4", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
315
+ ],
316
+ },
317
+ reportInterferenceArea: {
318
+ ID: 2,
319
+ parameters: mmWaveCommandResponseAreaParameters,
320
+ },
321
+ reportDetectionArea: {
322
+ ID: 3,
323
+ parameters: mmWaveCommandResponseAreaParameters,
324
+ },
325
+ reportStayArea: {
326
+ ID: 4,
327
+ parameters: mmWaveCommandResponseAreaParameters,
328
+ },
329
+ },
330
+ });
331
+ },
268
332
  inovelliDevice: ({ attrs, supportsLedEffects, supportsButtonTaps, splitValuesByEndpoint = false, }) => {
269
333
  // biome-ignore lint/suspicious/noExplicitAny: generic
270
334
  const fromZigbee = [];
@@ -388,11 +452,25 @@ const inovelliExtend = {
388
452
  };
389
453
  },
390
454
  inovelliMMWave: () => {
455
+ const configure = [
456
+ async (device, coordinatorEndpoint, definition) => {
457
+ const endpoint = device.getEndpoint(1);
458
+ await reporting.bind(endpoint, coordinatorEndpoint, [INOVELLI_MMWAVE_CLUSTER_NAME]);
459
+ await endpoint.command(INOVELLI_MMWAVE_CLUSTER_NAME, "mmWaveControl", {
460
+ controlID: mmWaveControlCommands.query_areas,
461
+ }, { disableResponse: true, disableDefaultResponse: true });
462
+ },
463
+ ];
391
464
  return {
392
- fromZigbee: [],
393
- toZigbee: [tzLocal.inovelli_mmwave_control_commands],
394
- exposes: [exposeMMWaveControl()],
395
- configure: [],
465
+ fromZigbee: [fzLocal.anyone_in_reporting_area, fzLocal.report_areas],
466
+ toZigbee: [
467
+ tzLocal.inovelli_mmwave_control_commands,
468
+ tzLocal.mmwave_detection_areas,
469
+ tzLocal.mmwave_interference_areas,
470
+ tzLocal.mmwave_stay_areas,
471
+ ],
472
+ exposes: [exposeMMWaveControl(), ...exposeMMWaveAreas(), exposeInterferenceAreas(), exposeDetectionAreas(), exposeStayAreas()],
473
+ configure: configure,
396
474
  isModernExtend: true,
397
475
  };
398
476
  },
@@ -1614,6 +1692,49 @@ const VZM36_ATTRIBUTES = {
1614
1692
  description: "Use device in ceiling fan (3-Speed) or in exhaust fan (On/Off) mode.",
1615
1693
  },
1616
1694
  };
1695
+ function createMmWaveCompositeAreaConverter(key, command) {
1696
+ return {
1697
+ key: [key],
1698
+ convertSet: async (entity, key, values, meta) => {
1699
+ utils.assertObject(values);
1700
+ // The composite structure has area1, area2, area3, area4 as keys
1701
+ const areaKeys = ["area1", "area2", "area3", "area4"];
1702
+ const state = { [key]: {} };
1703
+ const compositeState = state[key];
1704
+ // Process each area that's provided in the composite
1705
+ for (const areaKey of areaKeys) {
1706
+ if (areaKey in values && utils.isObject(values[areaKey])) {
1707
+ const areaData = values[areaKey];
1708
+ // Extract area number from "area1" -> 1, "area2" -> 2, etc.
1709
+ const areaId = Number.parseInt(areaKey.replace("area", ""), 10);
1710
+ const payload = {
1711
+ // areaID is zero indexed
1712
+ areaId: areaId - 1,
1713
+ xMin: areaData.width_min,
1714
+ xMax: areaData.width_max,
1715
+ yMin: areaData.depth_min,
1716
+ yMax: areaData.depth_max,
1717
+ zMin: areaData.height_min,
1718
+ zMax: areaData.height_max,
1719
+ };
1720
+ await entity.command(INOVELLI_MMWAVE_CLUSTER_NAME, command, payload, {
1721
+ disableResponse: true,
1722
+ disableDefaultResponse: true,
1723
+ });
1724
+ // Store the area data in the state
1725
+ compositeState[areaKey] = areaData;
1726
+ }
1727
+ }
1728
+ // Query areas after all updates are complete
1729
+ if (Object.keys(compositeState).length > 0) {
1730
+ await entity.command(INOVELLI_MMWAVE_CLUSTER_NAME, "mmWaveControl", {
1731
+ controlID: mmWaveControlCommands.query_areas,
1732
+ }, { disableResponse: true, disableDefaultResponse: true });
1733
+ }
1734
+ return { state };
1735
+ },
1736
+ };
1737
+ }
1617
1738
  const tzLocal = {
1618
1739
  inovelli_parameters: (attributes, cluster) => ({
1619
1740
  key: Object.keys(attributes).filter((a) => !attributes[a].readOnly),
@@ -1724,6 +1845,9 @@ const tzLocal = {
1724
1845
  return { state: { [key]: values } };
1725
1846
  },
1726
1847
  },
1848
+ mmwave_detection_areas: createMmWaveCompositeAreaConverter("mmwave_detection_areas", "setDetectionArea"),
1849
+ mmwave_interference_areas: createMmWaveCompositeAreaConverter("mmwave_interference_areas", "setInterferenceArea"),
1850
+ mmwave_stay_areas: createMmWaveCompositeAreaConverter("mmwave_stay_areas", "setStayArea"),
1727
1851
  /*
1728
1852
  * Inovelli devices have a default transition property that the device should
1729
1853
  * fallback to if a transition is not specified by passing 0xffff
@@ -1903,7 +2027,7 @@ const tzLocal = {
1903
2027
  const fzLocal = {
1904
2028
  inovelli: (attributes, cluster, splitValuesByEndpoint = false) => ({
1905
2029
  cluster: cluster,
1906
- type: ["raw", "readResponse"],
2030
+ type: ["raw", "readResponse", "attributeReport"],
1907
2031
  convert: (model, msg, publish, options, meta) => {
1908
2032
  if (msg.type === "raw" && msg.endpoint.ID === 2 && msg.data[4] === 0x00) {
1909
2033
  // Scene Event
@@ -1923,7 +2047,7 @@ const fzLocal = {
1923
2047
  const action = clickLookup[msg.data[6]];
1924
2048
  return { action: `${button}_${action}` };
1925
2049
  }
1926
- if (msg.type === "readResponse") {
2050
+ if (msg.type === "readResponse" || msg.type === "attributeReport") {
1927
2051
  return Object.keys(msg.data).reduce((p, c) => {
1928
2052
  const key = splitValuesByEndpoint ? `${c}_${msg.endpoint.ID}` : c;
1929
2053
  const raw = msg.data[c];
@@ -2055,6 +2179,45 @@ const fzLocal = {
2055
2179
  return { notificationComplete: "Unknown" };
2056
2180
  },
2057
2181
  },
2182
+ report_areas: {
2183
+ cluster: INOVELLI_MMWAVE_CLUSTER_NAME,
2184
+ type: ["commandReportInterferenceArea", "commandReportDetectionArea", "commandReportStayArea"],
2185
+ convert: (model, msg, publish, options, meta) => {
2186
+ const areas = {};
2187
+ const data = msg.data;
2188
+ for (let i = 1; i <= 4; i++) {
2189
+ areas[`area${i}`] = {
2190
+ width_min: data[`xMin${i}`],
2191
+ width_max: data[`xMax${i}`],
2192
+ height_min: data[`zMin${i}`],
2193
+ height_max: data[`zMax${i}`],
2194
+ depth_min: data[`yMin${i}`],
2195
+ depth_max: data[`yMax${i}`],
2196
+ };
2197
+ }
2198
+ const result = {};
2199
+ // Map command types to the new property names
2200
+ const propertyMap = {
2201
+ commandReportInterferenceArea: "mmwave_interference_areas",
2202
+ commandReportDetectionArea: "mmwave_detection_areas",
2203
+ commandReportStayArea: "mmwave_stay_areas",
2204
+ };
2205
+ result[propertyMap[msg.type]] = areas;
2206
+ return result;
2207
+ },
2208
+ },
2209
+ anyone_in_reporting_area: {
2210
+ cluster: INOVELLI_MMWAVE_CLUSTER_NAME,
2211
+ type: ["commandAnyoneInReportingArea"],
2212
+ convert: (model, msg, publish, options, meta) => {
2213
+ return {
2214
+ mmwave_area1_occupancy: msg.data.area1 === 1,
2215
+ mmwave_area2_occupancy: msg.data.area2 === 1,
2216
+ mmwave_area3_occupancy: msg.data.area3 === 1,
2217
+ mmwave_area4_occupancy: msg.data.area4 === 1,
2218
+ };
2219
+ },
2220
+ },
2058
2221
  };
2059
2222
  const exposeLedEffects = () => {
2060
2223
  return e
@@ -2125,6 +2288,82 @@ const exposeLedEffectComplete = () => {
2125
2288
  const exposeEnergyReset = () => {
2126
2289
  return e.enum("energy_reset", ea.SET, ["reset"]).withDescription("Reset energy meter").withCategory("config");
2127
2290
  };
2291
+ const exposeMMWaveAreas = () => {
2292
+ return [
2293
+ e
2294
+ .binary("area1Occupancy", ea.STATE, true, false)
2295
+ .withProperty("mmwave_area1_occupancy")
2296
+ .withDescription("Indicates whether the device detected occupancy in Area 1"),
2297
+ e
2298
+ .binary("area2Occupancy", ea.STATE, true, false)
2299
+ .withProperty("mmwave_area2_occupancy")
2300
+ .withDescription("Indicates whether the device detected occupancy in Area 2"),
2301
+ e
2302
+ .binary("area3Occupancy", ea.STATE, true, false)
2303
+ .withProperty("mmwave_area3_occupancy")
2304
+ .withDescription("Indicates whether the device detected occupancy in Area 3"),
2305
+ e
2306
+ .binary("area4Occupancy", ea.STATE, true, false)
2307
+ .withProperty("mmwave_area4_occupancy")
2308
+ .withDescription("Indicates whether the device detected occupancy in Area 4"),
2309
+ ];
2310
+ };
2311
+ const createAreaComposite = (areaName, property) => {
2312
+ return e
2313
+ .composite(areaName, property, ea.STATE)
2314
+ .withFeature(e
2315
+ .numeric("width_min", ea.STATE_SET)
2316
+ .withValueMin(-600)
2317
+ .withValueMax(600)
2318
+ .withDescription("Defines the area (negative values are left of the switch facing away from the wall, positive values are right)"))
2319
+ .withFeature(e
2320
+ .numeric("width_max", ea.STATE_SET)
2321
+ .withValueMin(-600)
2322
+ .withValueMax(600)
2323
+ .withDescription("Defines the area (negative values are left of the switch facing away from the wall, positive values are right)"))
2324
+ .withFeature(e
2325
+ .numeric("height_min", ea.STATE_SET)
2326
+ .withValueMin(-600)
2327
+ .withValueMax(600)
2328
+ .withDescription("Defines the area (negative values are below the switch, positive values are above)"))
2329
+ .withFeature(e
2330
+ .numeric("height_max", ea.STATE_SET)
2331
+ .withValueMin(-600)
2332
+ .withValueMax(600)
2333
+ .withDescription("Defines the area (negative values are below the switch, positive values are above)"))
2334
+ .withFeature(e.numeric("depth_min", ea.STATE_SET).withValueMin(0).withValueMax(600).withDescription("Defines the area in front of the switch"))
2335
+ .withFeature(e.numeric("depth_max", ea.STATE_SET).withValueMin(0).withValueMax(600).withDescription("Defines the area in front of the switch"));
2336
+ };
2337
+ const exposeDetectionAreas = () => {
2338
+ return e
2339
+ .composite("mmwave_detection_areas", "mmwave_detection_areas", ea.STATE_SET)
2340
+ .withDescription("Defines one or more active detection zones where the sensor reports movement or occupancy. Up to four detection zones can be set.")
2341
+ .withFeature(createAreaComposite("area_1", "area1"))
2342
+ .withFeature(createAreaComposite("area_2", "area2"))
2343
+ .withFeature(createAreaComposite("area_3", "area3"))
2344
+ .withFeature(createAreaComposite("area_4", "area4"))
2345
+ .withCategory("config");
2346
+ };
2347
+ const exposeInterferenceAreas = () => {
2348
+ return e
2349
+ .composite("mmwave_interference_areas", "mmwave_interference_areas", ea.STATE_SET)
2350
+ .withDescription("Manually defines the coordinates of an interference area, which is an ignored zone where targets are not reported as present. Up to four zones can be defined.")
2351
+ .withFeature(createAreaComposite("area_1", "area1"))
2352
+ .withFeature(createAreaComposite("area_2", "area2"))
2353
+ .withFeature(createAreaComposite("area_3", "area3"))
2354
+ .withFeature(createAreaComposite("area_4", "area4"))
2355
+ .withCategory("config");
2356
+ };
2357
+ const exposeStayAreas = () => {
2358
+ return e
2359
+ .composite("mmwave_stay_areas", "mmwave_stay_areas", ea.STATE_SET)
2360
+ .withDescription("Defines one or more stay areas where stationary presence should still be detected. Up to four stay zones can be configured.")
2361
+ .withFeature(createAreaComposite("area_1", "area1"))
2362
+ .withFeature(createAreaComposite("area_2", "area2"))
2363
+ .withFeature(createAreaComposite("area_3", "area3"))
2364
+ .withFeature(createAreaComposite("area_4", "area4"))
2365
+ .withCategory("config");
2366
+ };
2128
2367
  const BUTTON_TAP_SEQUENCES = [
2129
2368
  "down_single",
2130
2369
  "up_single",
@@ -2177,11 +2416,11 @@ exports.definitions = [
2177
2416
  supportsButtonTaps: true,
2178
2417
  }),
2179
2418
  inovelliExtend.addCustomClusterInovelli(),
2180
- inovelliExtend.inovelliEnergyReset(),
2181
2419
  m.identify(),
2420
+ inovelliExtend.inovelliEnergyReset(),
2421
+ m.electricityMeter({ energy: { divisor: 1000 } }),
2182
2422
  m.temperature(),
2183
2423
  m.humidity(),
2184
- m.electricityMeter({ energy: { divisor: 1000 } }),
2185
2424
  ],
2186
2425
  ota: true,
2187
2426
  },
@@ -2202,8 +2441,8 @@ exports.definitions = [
2202
2441
  supportsButtonTaps: true,
2203
2442
  }),
2204
2443
  inovelliExtend.addCustomClusterInovelli(),
2205
- inovelliExtend.inovelliEnergyReset(),
2206
2444
  m.identify(),
2445
+ inovelliExtend.inovelliEnergyReset(),
2207
2446
  m.electricityMeter({
2208
2447
  current: false,
2209
2448
  voltage: false,
@@ -2235,12 +2474,9 @@ exports.definitions = [
2235
2474
  inovelliExtend.inovelliMMWave(),
2236
2475
  inovelliExtend.addCustomClusterInovelli(),
2237
2476
  inovelliExtend.addCustomMMWaveClusterInovelli(),
2238
- inovelliExtend.inovelliEnergyReset(),
2239
2477
  m.identify(),
2478
+ inovelliExtend.inovelliEnergyReset(),
2240
2479
  m.electricityMeter({
2241
- // Current and voltage were removed in version 0.8 of the firmware and expected to be restored in the future
2242
- current: false,
2243
- voltage: false,
2244
2480
  energy: { divisor: 1000 },
2245
2481
  }),
2246
2482
  m.illuminance(),