mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 02:18:31 -07:00
Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2967
This commit is contained in:
parent
2a9d0d1875
commit
dd82b29629
6
npm-shrinkwrap.json
generated
6
npm-shrinkwrap.json
generated
@ -14744,9 +14744,9 @@
|
||||
}
|
||||
},
|
||||
"zigbee-herdsman-converters": {
|
||||
"version": "12.0.28",
|
||||
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.28.tgz",
|
||||
"integrity": "sha512-Ab/fL3DhvgogCBmKfVP4i5zj3+iMx9Cb59w2v0zAMJBZP/rfYg31+PzBbkPLrJCsWX+2aexsla1LaiKYQzV4iw==",
|
||||
"version": "12.0.30",
|
||||
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.30.tgz",
|
||||
"integrity": "sha512-MHZAA8mO+hhI3zbNjHLcMIaF0tWrvCWidJB4Cn+QozdeVpZ77C3Jjr44177LO8OYbI1m6s0pHotaKrQlbkQt1g==",
|
||||
"requires": {
|
||||
"axios": "*",
|
||||
"tar-stream": "*"
|
||||
|
@ -46,7 +46,7 @@
|
||||
"semver": "*",
|
||||
"winston": "*",
|
||||
"zigbee-herdsman": "0.12.55",
|
||||
"zigbee-herdsman-converters": "12.0.28"
|
||||
"zigbee-herdsman-converters": "12.0.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "*",
|
||||
|
@ -186,6 +186,25 @@ describe('Device receive', () => {
|
||||
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 1, "retain": false});
|
||||
});
|
||||
|
||||
it('WSDCGQ11LM pressure precision from non ZCL properties', async () => {
|
||||
const device = zigbeeHerdsman.devices.WSDCGQ11LM;
|
||||
settings.set(['devices', device.ieeeAddr, 'temperature_precision'], 1);
|
||||
|
||||
MQTT.publish.mockClear();
|
||||
let payload = {data: {"65281":{"1":2985,"4":5032,"5":9,"6":[0,1],"10":0,"100":2345,"101":4608,"102":91552}}, cluster: 'genBasic', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10};
|
||||
await zigbeeHerdsman.events.message(payload);
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({"battery":91,"voltage":2985,"temperature":23.5,"humidity":46.08,"pressure":915.5,"linkquality":10});
|
||||
|
||||
MQTT.publish.mockClear();
|
||||
payload = {data: {"16":9354,"20":-1,"measuredValue":915}, cluster: 'msPressureMeasurement', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10};
|
||||
await zigbeeHerdsman.events.message(payload);
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({"battery":91,"voltage":2985,"temperature":23.5,"humidity":46.08,"pressure":935.4,"linkquality":10});
|
||||
});
|
||||
|
||||
it('Should handle a zigbee message with voltage 3010', async () => {
|
||||
const device = zigbeeHerdsman.devices.WXKG02LM;
|
||||
const data = {'65281': {'1': 3010}}
|
||||
|
Loading…
Reference in New Issue
Block a user