mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-28 23:00:55 +00:00
Update zigbee-shepherd-converters to 7.0.7. #142
This commit is contained in:
Generated
+3
-3
@@ -4823,9 +4823,9 @@
|
||||
}
|
||||
},
|
||||
"zigbee-shepherd-converters": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-7.0.6.tgz",
|
||||
"integrity": "sha512-aHFGC8WheiPPmbjEqjUU3+GxJvsasHGFweFMUyTrJwQ733B7DL63nbhls/gtao4izTBM1lbbmkqwz9Cywa2Nrw==",
|
||||
"version": "7.0.7",
|
||||
"resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-7.0.7.tgz",
|
||||
"integrity": "sha512-b877BWlhRV6PB+XjKXbQAdp32XjV7YxFXCXwlQVaSlJJ9Xx7BYHtvAXl67RZt2lqxfPbCe5NN4yTfjc0VRDZkw==",
|
||||
"requires": {
|
||||
"debounce": "*",
|
||||
"debug": "3.2.6",
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@
|
||||
"winston": "2.4.2",
|
||||
"ziee": "*",
|
||||
"zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#8d22cb5e0167a9f2d754efc8b228007fcd403441",
|
||||
"zigbee-shepherd-converters": "7.0.6",
|
||||
"zigbee-shepherd-converters": "7.0.7",
|
||||
"zive": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -132,5 +132,32 @@ describe('DeviceReceive', () => {
|
||||
chai.assert.isTrue(publishDeviceState.calledOnce);
|
||||
chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), {temperature: -0.85});
|
||||
});
|
||||
|
||||
it('Should handle a zigbee message with voltage 3010', () => {
|
||||
const device = {ieeeAddr: '0x12345678'};
|
||||
const message = utils.zigbeeMessage(device, 'genBasic', 'attReport', {'65281': {'1': 3010}}, 1);
|
||||
deviceReceive.onZigbeeMessage(message, device, WXKG02LM);
|
||||
chai.assert.isTrue(publishDeviceState.calledOnce);
|
||||
const expected = {battery: 100, voltage: 3010};
|
||||
chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected);
|
||||
});
|
||||
|
||||
it('Should handle a zigbee message with voltage 2750', () => {
|
||||
const device = {ieeeAddr: '0x12345678'};
|
||||
const message = utils.zigbeeMessage(device, 'genBasic', 'attReport', {'65281': {'1': 2850}}, 1);
|
||||
deviceReceive.onZigbeeMessage(message, device, WXKG02LM);
|
||||
chai.assert.isTrue(publishDeviceState.calledOnce);
|
||||
const expected = {battery: 50, voltage: 2850};
|
||||
chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected);
|
||||
});
|
||||
|
||||
it('Should handle a zigbee message with voltage 2650', () => {
|
||||
const device = {ieeeAddr: '0x12345678'};
|
||||
const message = utils.zigbeeMessage(device, 'genBasic', 'attReport', {'65281': {'1': 2650}}, 1);
|
||||
deviceReceive.onZigbeeMessage(message, device, WXKG02LM);
|
||||
chai.assert.isTrue(publishDeviceState.calledOnce);
|
||||
const expected = {battery: 0, voltage: 2650};
|
||||
chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user