diff --git a/devices/xiaomi.js b/devices/xiaomi.js index c4ac2d35e9fde..fe09e07bd90d0 100644 --- a/devices/xiaomi.js +++ b/devices/xiaomi.js @@ -735,8 +735,9 @@ module.exports = [ fromZigbee: [fz.xiaomi_battery, fz.DJT11LM_vibration], toZigbee: [tz.DJT11LM_vibration_sensitivity], exposes: [ - e.battery(), e.action(['vibration', 'tilt', 'drop']), exposes.numeric('strength', ea.STATE), - exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']), e.battery_voltage(), + e.battery(), e.action(['vibration', 'tilt', 'drop']), + exposes.numeric('strength', ea.STATE), exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']), + e.angle_axis('angle_x'), e.angle_axis('angle_y'), e.angle_axis('angle_z'), e.battery_voltage(), ], }, { diff --git a/lib/exposes.js b/lib/exposes.js index 3d3141101fca3..59d3e26b96377 100644 --- a/lib/exposes.js +++ b/lib/exposes.js @@ -453,6 +453,7 @@ module.exports = { presets: { action: (values) => new Enum('action', access.STATE, values).withDescription('Triggered action (e.g. a button click)'), angle: (name) => new Numeric(name, access.STATE).withValueMin(-360).withValueMax(360), + angle_axis: (name) => new Numeric(name, access.STATE).withValueMin(-90).withValueMax(90), aqi: () => new Numeric('aqi', access.STATE).withDescription('Air quality index'), auto_lock: () => new Switch().withState('auto_lock', false, 'Enable/disable auto lock', access.STATE_SET, 'AUTO', 'MANUAL'), auto_relock_time: () => new Numeric('auto_relock_time', access.ALL).withValueMin(0).withUnit('s').withDescription('The number of seconds to wait after unlocking a lock before it automatically locks again. 0=disabled'),