From c23d2444054da6458fcdc6873420ff39ed536656 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Wed, 7 Jun 2023 16:30:11 +0200 Subject: [PATCH] Update zigbee-herdsman-converters to 15.19.1 (#17941) * fix(ignore): update zigbee-herdsman-converters to 15.19.1 * fix --------- Co-authored-by: Koenkk --- lib/extension/publish.ts | 3 ++- lib/types/zigbee-herdsman-converters.d.ts | 4 ---- package-lock.json | 14 +++++++------- package.json | 2 +- test/receive.test.js | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/extension/publish.ts b/lib/extension/publish.ts index 2dc9becf..e41f77f4 100644 --- a/lib/extension/publish.ts +++ b/lib/extension/publish.ts @@ -1,7 +1,7 @@ import * as settings from '../util/settings'; import zigbeeHerdsmanConverters from 'zigbee-herdsman-converters'; -import philips from 'zigbee-herdsman-converters/lib/philips'; +import * as philips from 'zigbee-herdsman-converters/lib/philips'; import logger from '../util/logger'; import utils from '../util/utils'; import Extension from './extension'; @@ -144,6 +144,7 @@ export default class Publish extends Extension { { if (Array.isArray(definition)) { const c = new Set(definition.map((d) => d.toZigbee).flat()); + // @ts-expect-error if (c.size == 0) converters = defaultGroupConverters; else converters = Array.from(c); } else if (definition) { diff --git a/lib/types/zigbee-herdsman-converters.d.ts b/lib/types/zigbee-herdsman-converters.d.ts index ea12b54c..8e382d8a 100644 --- a/lib/types/zigbee-herdsman-converters.d.ts +++ b/lib/types/zigbee-herdsman-converters.d.ts @@ -16,7 +16,3 @@ declare module 'zigbee-herdsman-converters/lib/ota/zigbeeOTA' { export function useIndexOverride(indexFileName: string): void; export function setDataDir(dataDir: string): void; } - -declare module 'zigbee-herdsman-converters/lib/philips' { - export const tz: {[s: string]: zhc.ToZigbeeConverter}; -} diff --git a/package-lock.json b/package-lock.json index 6762ec26..116f0ef2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "winston-transport": "^4.5.0", "ws": "^8.13.0", "zigbee-herdsman": "0.14.117", - "zigbee-herdsman-converters": "15.18.0", + "zigbee-herdsman-converters": "15.19.1", "zigbee2mqtt-frontend": "0.6.129" }, "bin": { @@ -9575,9 +9575,9 @@ } }, "node_modules/zigbee-herdsman-converters": { - "version": "15.18.0", - "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-15.18.0.tgz", - "integrity": "sha512-UbmSBlf7B368VSWMSezmTnv4Ov5gqbrYXTIlFVuwxqN7uFnXwdU1qhR4RHvZGTFEub73HLYh5kQsm7NtiY2/UQ==", + "version": "15.19.1", + "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-15.19.1.tgz", + "integrity": "sha512-Fxzm3xWspkjgj7BXyA0W9+n86C237dbANJUpLdKdYbFOTqa87mHrqHxS28zLfMf/y24G9+chTBYRjqWbaWjo/g==", "dependencies": { "axios": "^1.4.0", "buffer-crc32": "^0.2.13", @@ -16574,9 +16574,9 @@ } }, "zigbee-herdsman-converters": { - "version": "15.18.0", - "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-15.18.0.tgz", - "integrity": "sha512-UbmSBlf7B368VSWMSezmTnv4Ov5gqbrYXTIlFVuwxqN7uFnXwdU1qhR4RHvZGTFEub73HLYh5kQsm7NtiY2/UQ==", + "version": "15.19.1", + "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-15.19.1.tgz", + "integrity": "sha512-Fxzm3xWspkjgj7BXyA0W9+n86C237dbANJUpLdKdYbFOTqa87mHrqHxS28zLfMf/y24G9+chTBYRjqWbaWjo/g==", "requires": { "axios": "^1.4.0", "buffer-crc32": "^0.2.13", diff --git a/package.json b/package.json index 213bdf7c..537a5237 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "winston-transport": "^4.5.0", "ws": "^8.13.0", "zigbee-herdsman": "0.14.117", - "zigbee-herdsman-converters": "15.18.0", + "zigbee-herdsman-converters": "15.19.1", "zigbee2mqtt-frontend": "0.6.129" }, "devDependencies": { diff --git a/test/receive.test.js b/test/receive.test.js index 8e9b40bb..59bac63a 100755 --- a/test/receive.test.js +++ b/test/receive.test.js @@ -299,7 +299,7 @@ describe('Receive', () => { it('Should publish 1 message when converted twice', async () => { const device = zigbeeHerdsman.devices.RTCGQ11LM; - const data = {'65281': {'1': 3045, '3': 19, '4': 17320, '5': 35, '6': [0, 3], '10': 51107, '11': 381, '100': 0}} + const data = {'65281': {'1': 3045, '3': 19, '5': 35, '6': [0, 3], '11': 381, '100': 0}} const payload = {data, cluster: 'genBasic', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10}; await zigbeeHerdsman.events.message(payload); await flushPromises();