Skip to content

Commit

Permalink
Merge branch 'master' into device-state-nan
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Jan 3, 2022
2 parents 367f006 + a0b8831 commit 357498b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions server/services/xiaomi/lib/event/xiaomi.onMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function onMessage(msg, rsinfo) {
case 'sensor_cube.aqgl01':
this.newValueCube(message, data);
break;
case 'sensor_switch.aq2':
case 'switch':
this.newValueSwitch(message, data);
break;
Expand Down
8 changes: 0 additions & 8 deletions server/services/zigbee2mqtt/exposes/numericType.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ module.exports = {
max: 100,
},
},
illuminance: {
feature: {
category: DEVICE_FEATURE_CATEGORIES.LIGHT_SENSOR,
type: DEVICE_FEATURE_TYPES.SENSOR.DECIMAL,
min: 0,
max: 100000,
},
},
illuminance_lux: {
feature: {
category: DEVICE_FEATURE_CATEGORIES.LIGHT_SENSOR,
Expand Down
10 changes: 9 additions & 1 deletion server/test/services/xiaomi/messagesToTest.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
case '86sw2':
this.newValueDuplexWirelessSwitch(message, data);
break;
Expand Down Expand Up @@ -88,6 +88,14 @@ const MESSAGES = [
}),
},
// SWITCH
{
sid: `1245${(counter += 1)}`,
model: 'sensor_switch.aq2',
data: JSON.stringify({
status: 'click',
voltage: 3000,
}),
},
{
sid: `1245${(counter += 1)}`,
model: 'switch',
Expand Down

0 comments on commit 357498b

Please sign in to comment.