zigbee-herdsman-converters 25.91.0 → 25.93.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 (56) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/converters/fromZigbee.js +2 -2
  3. package/dist/converters/fromZigbee.js.map +1 -1
  4. package/dist/devices/dresden_elektronik.d.ts.map +1 -1
  5. package/dist/devices/dresden_elektronik.js +16 -6
  6. package/dist/devices/dresden_elektronik.js.map +1 -1
  7. package/dist/devices/ezviz.d.ts +3 -0
  8. package/dist/devices/ezviz.d.ts.map +1 -0
  9. package/dist/devices/ezviz.js +47 -0
  10. package/dist/devices/ezviz.js.map +1 -0
  11. package/dist/devices/gewiss.d.ts.map +1 -1
  12. package/dist/devices/gewiss.js +2 -1
  13. package/dist/devices/gewiss.js.map +1 -1
  14. package/dist/devices/gledopto.js +1 -1
  15. package/dist/devices/gledopto.js.map +1 -1
  16. package/dist/devices/heiman.d.ts.map +1 -1
  17. package/dist/devices/heiman.js +948 -256
  18. package/dist/devices/heiman.js.map +1 -1
  19. package/dist/devices/index.d.ts.map +1 -1
  20. package/dist/devices/index.js +2 -0
  21. package/dist/devices/index.js.map +1 -1
  22. package/dist/devices/inovelli.js +1 -1
  23. package/dist/devices/inovelli.js.map +1 -1
  24. package/dist/devices/ledvance.d.ts.map +1 -1
  25. package/dist/devices/ledvance.js +14 -20
  26. package/dist/devices/ledvance.js.map +1 -1
  27. package/dist/devices/lightsolutions.d.ts.map +1 -1
  28. package/dist/devices/lightsolutions.js +7 -0
  29. package/dist/devices/lightsolutions.js.map +1 -1
  30. package/dist/devices/lumi.d.ts.map +1 -1
  31. package/dist/devices/lumi.js +28 -34
  32. package/dist/devices/lumi.js.map +1 -1
  33. package/dist/devices/moes.d.ts.map +1 -1
  34. package/dist/devices/moes.js +98 -0
  35. package/dist/devices/moes.js.map +1 -1
  36. package/dist/devices/muller_licht.d.ts.map +1 -1
  37. package/dist/devices/muller_licht.js +7 -0
  38. package/dist/devices/muller_licht.js.map +1 -1
  39. package/dist/devices/philips.d.ts.map +1 -1
  40. package/dist/devices/philips.js +31 -13
  41. package/dist/devices/philips.js.map +1 -1
  42. package/dist/devices/sonoff.d.ts.map +1 -1
  43. package/dist/devices/sonoff.js +45 -53
  44. package/dist/devices/sonoff.js.map +1 -1
  45. package/dist/devices/tuya.d.ts.map +1 -1
  46. package/dist/devices/tuya.js +479 -17
  47. package/dist/devices/tuya.js.map +1 -1
  48. package/dist/lib/lumi.d.ts +2 -0
  49. package/dist/lib/lumi.d.ts.map +1 -1
  50. package/dist/lib/lumi.js +137 -0
  51. package/dist/lib/lumi.js.map +1 -1
  52. package/dist/lib/modernExtend.d.ts.map +1 -1
  53. package/dist/lib/modernExtend.js +3 -3
  54. package/dist/lib/modernExtend.js.map +1 -1
  55. package/dist/models-index.json +1 -1
  56. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"sonoff.d.ts","sourceRoot":"","sources":["../../src/devices/sonoff.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,oBAAoB,EAAyC,MAAM,cAAc,CAAC;AAmK/F,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,kBAAkB,EAAE,MAAM,CAAC;QAC3B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;QACzB,0BAA0B,EAAE,MAAM,CAAC;QACnC,4BAA4B,EAAE,MAAM,CAAC;QACrC,cAAc,EAAE,MAAM,CAAC;QACvB,qBAAqB,EAAE,MAAM,CAAC;QAC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EAAE,MAAM,CAAC;QAC9B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,mBAAmB,EAAE,MAAM,CAAC;QAE5B,sBAAsB,EAAE,MAAM,CAAC;QAC/B,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,oBAAoB,EAAE,MAAM,EAAE,CAAC;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,sBAAsB,EAAE,MAAM,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,EAAE;QACN,YAAY,EAAE;YAAC,IAAI,EAAE,MAAM,EAAE,CAAA;SAAC,CAAC;KAClC,CAAC;IACF,gBAAgB,EAAE,KAAK,CAAC;CAC3B;AAi9BD,eAAO,MAAM,WAAW,EAAE,oBAAoB,EA+7D7C,CAAC"}
@@ -217,21 +217,13 @@ const sonoffExtend = {
217
217
  };
218
218
  },
219
219
  weeklySchedule: () => {
220
- const exposes = e
221
- .composite("schedule", "weekly_schedule", ea.STATE_SET)
222
- .withCategory("config")
223
- .withDescription('The preset heating schedule to use when the system mode is set to "auto" (indicated with ⏲ on the TRV). ' +
220
+ const scheduleDescription = 'The preset heating schedule to use when the system mode is set to "auto" (indicated with ⏲ on the TRV). ' +
224
221
  "Up to 6 transitions can be defined per day, where a transition is expressed in the format 'HH:mm/temperature', each " +
225
222
  "separated by a space. The first transition for each day must start at 00:00 and the valid temperature range is 4-35°C " +
226
223
  "(in 0.5°C steps). The temperature will be set at the time of the first transition until the time of the next transition, " +
227
- "e.g. '04:00/20 10:00/25' will result in the temperature being set to 20°C at 04:00 until 10:00, when it will change to 25°C.")
228
- .withFeature(e.text("sunday", ea.STATE_SET))
229
- .withFeature(e.text("monday", ea.STATE_SET))
230
- .withFeature(e.text("tuesday", ea.STATE_SET))
231
- .withFeature(e.text("wednesday", ea.STATE_SET))
232
- .withFeature(e.text("thursday", ea.STATE_SET))
233
- .withFeature(e.text("friday", ea.STATE_SET))
234
- .withFeature(e.text("saturday", ea.STATE_SET));
224
+ "e.g. '04:00/20 10:00/25' will result in the temperature being set to 20°C at 04:00 until 10:00, when it will change to 25°C.";
225
+ const days = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
226
+ const exposes = days.map((day) => e.text(`weekly_schedule_${day}`, ea.STATE_SET).withCategory("config").withDescription(scheduleDescription));
235
227
  const fromZigbee = [
236
228
  {
237
229
  cluster: "hvacThermostat",
@@ -253,63 +245,60 @@ const sonoffExtend = {
253
245
  .sort()
254
246
  .join(" ");
255
247
  return {
256
- weekly_schedule: {
257
- ...meta.state.weekly_schedule,
258
- [day]: transitions,
259
- },
248
+ [`weekly_schedule_${day}`]: transitions,
260
249
  };
261
250
  },
262
251
  },
263
252
  ];
264
253
  const toZigbee = [
265
254
  {
266
- key: ["weekly_schedule"],
255
+ key: days.map((day) => `weekly_schedule_${day}`),
267
256
  convertSet: async (entity, key, value, meta) => {
268
257
  // Transition format: HH:mm/temperature
269
258
  const transitionRegex = /^(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])\/(\d+(\.5)?)$/;
270
- utils.assertObject(value, key);
271
- for (const dayOfWeekName of Object.keys(value)) {
272
- const dayKey = utils.getKey(constants.thermostatDayOfWeek, dayOfWeekName.toLowerCase(), null);
273
- if (dayKey === null) {
274
- throw new Error(`Invalid schedule: invalid day name, found: ${dayOfWeekName}`);
275
- }
276
- const dayOfWeekBit = Number(dayKey);
277
- const rawTransitions = value[dayOfWeekName].split(" ").sort();
278
- if (rawTransitions.length > 6) {
279
- throw new Error("Invalid schedule: days must have no more than 6 transitions");
280
- }
281
- const transitions = [];
282
- for (const transition of rawTransitions) {
283
- const matches = transition.match(transitionRegex);
284
- if (!matches) {
285
- throw new Error(`Invalid schedule: transitions must be in format HH:mm/temperature (e.g. 12:00/15.5), found: ${transition}`);
286
- }
287
- const hour = Number.parseInt(matches[1], 10);
288
- const mins = Number.parseInt(matches[2], 10);
289
- const temp = Number.parseFloat(matches[3]);
290
- if (temp < 4 || temp > 35) {
291
- throw new Error(`Invalid schedule: temperature value must be between 4-35 (inclusive), found: ${temp}`);
292
- }
293
- transitions.push({
294
- transitionTime: hour * 60 + mins,
295
- heatSetpoint: Math.round(temp * 100),
296
- });
259
+ utils.assertString(value, key);
260
+ // Extract day name from key (e.g., "weekly_schedule_monday" -> "monday")
261
+ const dayOfWeekName = key.replace("weekly_schedule_", "");
262
+ const dayKey = utils.getKey(constants.thermostatDayOfWeek, dayOfWeekName, null);
263
+ if (dayKey === null) {
264
+ throw new Error(`Invalid schedule: invalid day name, found: ${dayOfWeekName}`);
265
+ }
266
+ const dayOfWeekBit = Number(dayKey);
267
+ const rawTransitions = value.split(" ").sort();
268
+ if (rawTransitions.length > 6) {
269
+ throw new Error("Invalid schedule: days must have no more than 6 transitions");
270
+ }
271
+ const transitions = [];
272
+ for (const transition of rawTransitions) {
273
+ const matches = transition.match(transitionRegex);
274
+ if (!matches) {
275
+ throw new Error(`Invalid schedule: transitions must be in format HH:mm/temperature (e.g. 12:00/15.5), found: ${transition}`);
297
276
  }
298
- if (transitions[0].transitionTime !== 0) {
299
- throw new Error("Invalid schedule: the first transition of each day should start at 00:00");
277
+ const hour = Number.parseInt(matches[1], 10);
278
+ const mins = Number.parseInt(matches[2], 10);
279
+ const temp = Number.parseFloat(matches[3]);
280
+ if (temp < 4 || temp > 35) {
281
+ throw new Error(`Invalid schedule: temperature value must be between 4-35 (inclusive), found: ${temp}`);
300
282
  }
301
- await entity.command("hvacThermostat", "setWeeklySchedule", {
302
- dayofweek: 1 << Number(dayOfWeekBit),
303
- numoftrans: rawTransitions.length,
304
- mode: 1 << 0, // heat
305
- transitions,
306
- }, utils.getOptions(meta.mapped, entity));
283
+ transitions.push({
284
+ transitionTime: hour * 60 + mins,
285
+ heatSetpoint: Math.round(temp * 100),
286
+ });
307
287
  }
288
+ if (transitions[0].transitionTime !== 0) {
289
+ throw new Error("Invalid schedule: the first transition of each day should start at 00:00");
290
+ }
291
+ await entity.command("hvacThermostat", "setWeeklySchedule", {
292
+ dayofweek: 1 << Number(dayOfWeekBit),
293
+ numoftrans: rawTransitions.length,
294
+ mode: 1 << 0, // heat
295
+ transitions,
296
+ }, utils.getOptions(meta.mapped, entity));
308
297
  },
309
298
  },
310
299
  ];
311
300
  return {
312
- exposes: [exposes],
301
+ exposes,
313
302
  fromZigbee,
314
303
  toZigbee,
315
304
  isModernExtend: true,
@@ -2101,6 +2090,7 @@ exports.definitions = [
2101
2090
  }),
2102
2091
  m.numeric({
2103
2092
  name: "energy_yesterday",
2093
+ label: "Energy yesterday",
2104
2094
  cluster: "customClusterEwelink",
2105
2095
  attribute: "energyYesterday",
2106
2096
  description: "Electricity consumption for the yesterday",
@@ -2110,6 +2100,7 @@ exports.definitions = [
2110
2100
  }),
2111
2101
  m.numeric({
2112
2102
  name: "energy_today",
2103
+ label: "Energy today",
2113
2104
  cluster: "customClusterEwelink",
2114
2105
  attribute: "energyToday",
2115
2106
  description: "Electricity consumption for the day",
@@ -2119,6 +2110,7 @@ exports.definitions = [
2119
2110
  }),
2120
2111
  m.numeric({
2121
2112
  name: "energy_month",
2113
+ label: "Energy month",
2122
2114
  cluster: "customClusterEwelink",
2123
2115
  attribute: "energyMonth",
2124
2116
  description: "Electricity consumption for the month",