Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(xiaomi): expose angle axis properties from DJT11LM #2575

Merged
merged 1 commit into from
May 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions devices/xiaomi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
],
},
{
Expand Down
1 change: 1 addition & 0 deletions lib/exposes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down