zigbee-herdsman-converters 23.16.0 → 23.18.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.
@@ -1 +1 @@
1
- {"version":3,"file":"shelly.d.ts","sourceRoot":"","sources":["../../src/devices/shelly.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,WAAW,EAAE,oBAAoB,EAQ7C,CAAC"}
1
+ {"version":3,"file":"shelly.d.ts","sourceRoot":"","sources":["../../src/devices/shelly.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,WAAW,EAAE,oBAAoB,EAe7C,CAAC"}
@@ -43,5 +43,12 @@ exports.definitions = [
43
43
  description: "Mini gen 4",
44
44
  extend: [m.onOff({ powerOnBehavior: false })],
45
45
  },
46
+ {
47
+ fingerprint: [{ modelID: "1", manufacturerName: "Shelly" }],
48
+ model: "S4SW-001X16EU",
49
+ vendor: "Shelly",
50
+ description: "1 gen 4",
51
+ extend: [m.onOff({ powerOnBehavior: false })],
52
+ },
46
53
  ];
47
54
  //# sourceMappingURL=shelly.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shelly.js","sourceRoot":"","sources":["../../src/devices/shelly.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AAG5B,QAAA,WAAW,GAA2B;IAC/C;QACI,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,YAAY;QACzB,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,eAAe,EAAE,KAAK,EAAC,CAAC,CAAC;KAC9C;CACJ,CAAC"}
1
+ {"version":3,"file":"shelly.js","sourceRoot":"","sources":["../../src/devices/shelly.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AAG5B,QAAA,WAAW,GAA2B;IAC/C;QACI,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,YAAY;QACzB,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,eAAe,EAAE,KAAK,EAAC,CAAC,CAAC;KAC9C;IACD;QACI,WAAW,EAAE,CAAC,EAAC,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAC,CAAC;QACzD,KAAK,EAAE,eAAe;QACtB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,eAAe,EAAE,KAAK,EAAC,CAAC,CAAC;KAC9C;CACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tuya.d.ts","sourceRoot":"","sources":["../../src/devices/tuya.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,oBAAoB,EAA0E,MAAM,cAAc,CAAC;AAwvBhI,eAAO,MAAM,WAAW,EAAE,oBAAoB,EAi4e7C,CAAC"}
1
+ {"version":3,"file":"tuya.d.ts","sourceRoot":"","sources":["../../src/devices/tuya.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,oBAAoB,EAA0E,MAAM,cAAc,CAAC;AAiwBhI,eAAO,MAAM,WAAW,EAAE,oBAAoB,EAm5e7C,CAAC"}
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.definitions = void 0;
37
+ const zigbee_herdsman_1 = require("zigbee-herdsman");
37
38
  const fz = __importStar(require("../converters/fromZigbee"));
38
39
  const tz = __importStar(require("../converters/toZigbee"));
39
40
  const libColor = __importStar(require("../lib/color"));
@@ -266,6 +267,15 @@ const convLocal = {
266
267
  },
267
268
  };
268
269
  const tzLocal = {
270
+ ts110eCountdown: {
271
+ key: ["countdown"],
272
+ convertSet: async (entity, key, value, meta) => {
273
+ utils.assertNumber(value);
274
+ const data = Buffer.alloc(4);
275
+ data.writeUInt32LE(value);
276
+ await entity.command("genOnOff", "tuyaCountdown", { data });
277
+ },
278
+ },
269
279
  // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
270
280
  TS030F_border: {
271
281
  key: ["border"],
@@ -9847,12 +9857,30 @@ exports.definitions = [
9847
9857
  ],
9848
9858
  ota: true,
9849
9859
  fromZigbee: [fz.TS110E, fz.TS110E_light_type, tuya.fz.power_on_behavior_1, fz.on_off],
9850
- toZigbee: [tz.TS110E_onoff_brightness, tz.TS110E_options, tuya.tz.power_on_behavior_1, tz.light_brightness_move],
9851
- exposes: [
9852
- e.light_brightness().withMinBrightness().withMaxBrightness(),
9853
- tuya.exposes.lightType().withAccess(ea.ALL),
9854
- e.power_on_behavior().withAccess(ea.ALL),
9855
- tuya.exposes.switchType(),
9860
+ toZigbee: [tz.TS110E_onoff_brightness, tz.TS110E_options, tuya.tz.power_on_behavior_1, tz.light_brightness_move, tzLocal.ts110eCountdown],
9861
+ exposes: (device, options) => {
9862
+ // https://github.com/Koenkk/zigbee2mqtt/issues/26791#issuecomment-2765734859
9863
+ const countdownValueStep = device?.manufacturerName === "_TZ3210_ngqk6jia" ? 30 : 1;
9864
+ return [
9865
+ e.light_brightness().withMinBrightness().withMaxBrightness(),
9866
+ tuya.exposes.lightType().withAccess(ea.ALL),
9867
+ e.power_on_behavior().withAccess(ea.ALL),
9868
+ tuya.exposes.switchType(),
9869
+ tuya.exposes.countdown().withValueStep(countdownValueStep),
9870
+ ];
9871
+ },
9872
+ extend: [
9873
+ m.deviceAddCustomCluster("genOnOff", {
9874
+ ID: zigbee_herdsman_1.Zcl.Clusters.genOnOff.ID,
9875
+ attributes: {},
9876
+ commands: {
9877
+ tuyaCountdown: {
9878
+ ID: 0xf0,
9879
+ parameters: [{ name: "data", type: 1008 /* BUFFER */ }],
9880
+ },
9881
+ },
9882
+ commandsResponse: {},
9883
+ }),
9856
9884
  ],
9857
9885
  configure: async (device, coordinatorEndpoint) => {
9858
9886
  await tuya.configureMagicPacket(device, coordinatorEndpoint);