Update herdsman and converters.

This commit is contained in:
Koen Kanters
2019-11-05 21:14:19 +01:00
parent 99118a0ad8
commit 5cdf820bf6
5 changed files with 10 additions and 8 deletions
+2
View File
@@ -956,6 +956,8 @@ const mapping = {
'8718699688882': [cfg.light_brightness],
'LED1738G7': [cfg.light_brightness_colortemp],
'9290022169': [cfg.light_brightness_colortemp],
'TERNCY-PP01': [cfg.sensor_temperature, cfg.binary_sensor_occupancy, cfg.sensor_illuminance, cfg.sensor_click],
'CR11S8UZ': [cfg.sensor_action],
};
Object.keys(mapping).forEach((key) => {
+3 -3
View File
@@ -12637,9 +12637,9 @@
}
},
"zigbee-herdsman-converters": {
"version": "11.1.36",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-11.1.36.tgz",
"integrity": "sha512-LkjZmWSLEKCb0L7kvcJkPv6/50u/Qnb937LHRO51rYERidO/S8Gx4wrEat2mdT3okyxn31+Tk7QlKUdIPEMu5A=="
"version": "11.1.38",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-11.1.38.tgz",
"integrity": "sha512-gDDxPMxNtN0fVY7AQasXx3eZLEluGvLLx/4yV7Ph4CJ9KgEBG4gi93rRPgVViTD737y6GhqApgWuQDKlzH2tFw=="
}
}
}
+1 -1
View File
@@ -46,7 +46,7 @@
"semver": "*",
"winston": "*",
"zigbee-herdsman": "0.11.6",
"zigbee-herdsman-converters": "11.1.36"
"zigbee-herdsman-converters": "11.1.38"
},
"devDependencies": {
"eslint": "*",
+1 -1
View File
@@ -31,7 +31,7 @@ describe('Controller', () => {
it('Start controller', async () => {
await controller.start();
expect(logger.cleanup).toHaveBeenCalledTimes(1);
expect(zigbeeHerdsman.constructor).toHaveBeenCalledWith({"network":{"panID":6754,"extenedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]},"databasePath":path.join(data.mockDir, "database.db"),"backupPath":path.join(data.mockDir, "coordinator_backup.json"),"acceptJoiningDeviceHandler": expect.any(Function),"serialPort":{"baudRate":115200,"rtscts":true,"path":"/dev/dummy"}});
expect(zigbeeHerdsman.constructor).toHaveBeenCalledWith({"network":{"panID":6754,"extenedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]},"databasePath":path.join(data.mockDir, "database.db"), "databaseBackupPath":path.join(data.mockDir, "database.db.backup"),"backupPath":path.join(data.mockDir, "coordinator_backup.json"),"acceptJoiningDeviceHandler": expect.any(Function),"serialPort":{"baudRate":115200,"rtscts":true,"path":"/dev/dummy"}});
expect(zigbeeHerdsman.start).toHaveBeenCalledTimes(1);
expect(zigbeeHerdsman.setLED).toHaveBeenCalledTimes(0);
expect(zigbeeHerdsman.permitJoin).toHaveBeenCalledTimes(1);
+3 -3
View File
@@ -677,17 +677,17 @@ describe('Entity publish', () => {
expect(endpoint.command.mock.calls[0]).toEqual(["genOnOff", "on", {}, {}]);
});
it('Should turn device off when brightness 0 is send with light_brightness converter OFF', async () => {
it('Should turn device off with onOff on off with transition', async () => {
const device = zigbeeHerdsman.devices.bulb_color;
const endpoint = device.getEndpoint(1);
const payload = {state: 'OFF', transition: 1};
await MQTT.events.message('zigbee2mqtt/bulb_color/set', JSON.stringify(payload));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command.mock.calls[0]).toEqual(["genLevelCtrl", "moveToLevelWithOnOff", {level: 0, transtime: 10}, {}]);
expect(endpoint.command.mock.calls[0]).toEqual(["genOnOff", "off", {}, {}]);
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/bulb_color');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({state: 'OFF', brightness: 0});
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({state: 'OFF'});
});
it('Home Assistant: should set state', async () => {