mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 22:11:22 +00:00
Update zigbee-herdsman-converters.
This commit is contained in:
1 parent
d12943556c
commit
d444969151
3 files changed
+281
-136
No files matched your search
Generated
+267
-135
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -46,7 +46,7 @@
|
||||
"semver": "*",
|
||||
"winston": "*",
|
||||
"zigbee-herdsman": "0.7.0",
|
||||
"zigbee-herdsman-converters": "11.1.8"
|
||||
"zigbee-herdsman-converters": "11.1.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "*",
|
||||
|
||||
@@ -375,4 +375,17 @@ describe('Device receive', () => {
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(0);
|
||||
expect(logger.warn).toBeCalledTimes(0);
|
||||
});
|
||||
|
||||
it('Should allow to calibrate temperature values', async () => {
|
||||
const device = zigbeeHerdsman.devices.WSDCGQ11LM;
|
||||
settings.set(['devices', device.ieeeAddr, 'temperature_calibration'], 2);
|
||||
const data = {measuredValue: -85}
|
||||
const payload = {data, cluster: 'msTemperatureMeasurement', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10};
|
||||
await zigbeeHerdsman.events.message(payload);
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/weather_sensor');
|
||||
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({temperature: 1.15, linkquality: 10});
|
||||
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 1, "retain": false});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user