zigbee-herdsman-converters 21.23.0 → 21.24.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/lib/lumi.d.ts CHANGED
@@ -799,7 +799,7 @@ export declare const toZigbee: {
799
799
  key: string[];
800
800
  convertSet: (entity: import("zigbee-herdsman/dist/controller/model").Group | import("zigbee-herdsman/dist/controller/model").Endpoint, key: string, value: unknown, meta: Tz.Meta) => Promise<{
801
801
  state: {
802
- sensitivity: unknown;
802
+ sensitivity: number;
803
803
  };
804
804
  }>;
805
805
  };
package/lib/lumi.js CHANGED
@@ -4428,11 +4428,12 @@ exports.toZigbee = {
4428
4428
  lumi_vibration_sensitivity: {
4429
4429
  key: ['sensitivity'],
4430
4430
  convertSet: async (entity, key, value, meta) => {
4431
- (0, utils_1.assertString)(value, key);
4432
- value = value.toLowerCase();
4433
- const lookup = { low: 0x15, medium: 0x0b, high: 0x01 };
4431
+ if ((0, utils_1.isString)(value)) {
4432
+ value = (0, utils_1.getFromLookup)(value, { low: 0x15, medium: 0x0b, high: 0x01 });
4433
+ }
4434
+ (0, utils_1.assertNumber)(value);
4434
4435
  const options = { ...manufacturerOptions.lumi, timeout: 35000 };
4435
- await entity.write('genBasic', { 0xff0d: { value: (0, utils_1.getFromLookup)(value, lookup), type: 0x20 } }, options);
4436
+ await entity.write('genBasic', { 0xff0d: { value, type: 0x20 } }, options);
4436
4437
  return { state: { sensitivity: value } };
4437
4438
  },
4438
4439
  },