diff --git a/src/converters/toZigbee.js b/src/converters/toZigbee.js index eff2cb44308dc..d4fe9e1b1e89d 100644 --- a/src/converters/toZigbee.js +++ b/src/converters/toZigbee.js @@ -4640,8 +4640,8 @@ const converters = { TS0210_sensitivity: { key: ['sensitivity'], convertSet: async (entity, key, value, meta) => { - const sens = {'high': 0, 'medium': 2, 'low': 6}[value]; - await entity.write('ssIasZone', {currentZoneSensitivityLevel: sens}); + utils.assertNumber(value, 'sensitivity'); + await entity.write('ssIasZone', {currentZoneSensitivityLevel: value}); return {state: {sensitivity: value}}; }, }, diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 54db7ccf2e7e7..1e088d31645b3 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -3620,7 +3620,7 @@ const definitions: Definition[] = [ description: 'Vibration sensor', fromZigbee: [fz.battery, fz.ias_vibration_alarm_1_with_timeout], toZigbee: [tz.TS0210_sensitivity], - exposes: [e.battery(), e.battery_voltage(), e.vibration(), e.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high'])], + exposes: [e.battery(), e.battery_voltage(), e.vibration(), e.numeric('sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(50)], }, { fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_8bxrzyxz'},