Update zigbee-shepherd-converters to 8.0.7.

This commit is contained in:
Koen Kanters
2019-03-18 18:19:23 +01:00
parent 6d24a49062
commit 4cb0c0bbb0
3 changed files with 60 additions and 16 deletions
+15 -15
View File
@@ -259,9 +259,9 @@
"dev": true
},
"strip-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
"integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -2596,9 +2596,9 @@
}
},
"eslint": {
"version": "5.15.2",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.2.tgz",
"integrity": "sha512-I8VM4SILpMwUvsRt83bQVwIRQAJ2iPMXun1FVZ/lV1OHklH2tJaXqoDnNzdiFc6bnCtGKXvQIQNP3kj1eMskSw==",
"version": "5.15.3",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.3.tgz",
"integrity": "sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -3486,9 +3486,9 @@
}
},
"strip-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
"integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -6248,9 +6248,9 @@
}
},
"strip-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz",
"integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -6947,9 +6947,9 @@
}
},
"zigbee-shepherd-converters": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-8.0.6.tgz",
"integrity": "sha512-UDr90tDlKr0jnacp4K2O5GMatuL14ML0CihwXgvLinGbMicJnBgA+yHMYgWDqY6MbUPfnkaPT20b5cB5XtAKHA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-8.0.7.tgz",
"integrity": "sha512-1UHwDy26p8DTt+a9n7QJsj/QWm//KxOBDexQxfiVaKU3N5+l/zQ8UWhwuVk4hyL71sLvg/+TQeaD9iRBR4kQiA==",
"requires": {
"chai": "*",
"debounce": "*",
+1 -1
View File
@@ -46,7 +46,7 @@
"zcl-id": "git+https://github.com/Koenkk/zcl-id.git#4fa75c92424cd070a3bf6e1f4640b1e3ad8f802d",
"ziee": "*",
"zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#2e9045d873e38ff35069c92d926f003f04571387",
"zigbee-shepherd-converters": "8.0.6",
"zigbee-shepherd-converters": "8.0.7",
"zive": "*"
},
"devDependencies": {
+44
View File
@@ -783,4 +783,48 @@ describe('DevicePublish', () => {
await wait(10);
expect(zigbee.publish).toHaveBeenCalledTimes(2);
});
it('Should turn device of when brightness 0 is send', async () => {
zigbee.publish.mockClear();
publishEntityState.mockClear();
zigbee.getDevice = () => ({modelId: 'TRADFRI bulb E27 CWS opal 600lm'});
devicePublish.onMQTTMessage('zigbee2mqtt/0x00000001/set', JSON.stringify({brightness: 0}));
expect(zigbee.publish).toHaveBeenCalledTimes(1);
expect(zigbee.publish).toHaveBeenNthCalledWith(1,
'0x00000001',
'device',
'genOnOff',
'off',
'functional',
{},
cfg.default,
null,
expect.any(Function));
expect(publishEntityState).toHaveBeenCalledTimes(1);
expect(publishEntityState).toHaveBeenNthCalledWith(1,
'0x00000001',
{state: 'OFF'});
});
it('Should turn device of when brightness 0 is send with light_brightness converter', async () => {
zigbee.publish.mockClear();
publishEntityState.mockClear();
zigbee.getDevice = () => ({modelId: 'FB56+ZSC05HG1.0'});
devicePublish.onMQTTMessage('zigbee2mqtt/0x00000001/set', JSON.stringify({brightness: 0}));
expect(zigbee.publish).toHaveBeenCalledTimes(1);
expect(zigbee.publish).toHaveBeenNthCalledWith(1,
'0x00000001',
'device',
'genOnOff',
'off',
'functional',
{},
cfg.default,
null,
expect.any(Function));
expect(publishEntityState).toHaveBeenCalledTimes(1);
expect(publishEntityState).toHaveBeenNthCalledWith(1,
'0x00000001',
{state: 'OFF'});
});
});