From c82f93230da8d430cbbdb4aa3a35c1a3d7659b1c Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 1 Oct 2024 21:27:13 +0200 Subject: [PATCH] fix(ignore): update zigbee-herdsman-converters to 20.21.0 (#24172) * fix(ignore): update zigbee-herdsman-converters to 20.21.0 * fix --- package-lock.json | 10 ++-- package.json | 2 +- test/bridge.test.js | 108 +++++++++++++++++++++++++++++++++++++++- test/networkMap.test.js | 4 +- 4 files changed, 114 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0011c4adb..663f664cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "winston-transport": "^4.8.0", "ws": "^8.18.0", "zigbee-herdsman": "2.1.3", - "zigbee-herdsman-converters": "20.20.0", + "zigbee-herdsman-converters": "20.21.0", "zigbee2mqtt-frontend": "0.7.4" }, "bin": { @@ -10396,9 +10396,9 @@ } }, "node_modules/zigbee-herdsman-converters": { - "version": "20.20.0", - "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-20.20.0.tgz", - "integrity": "sha512-+OkgVO/lOfMuJ6LdgZmXrCbsY4sdfQM3nQ5Yq313sJbTNs3u5VF6xZ3KPx4+MnauFbTFKmlvK6aW2Yfcf+DpNA==", + "version": "20.21.0", + "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-20.21.0.tgz", + "integrity": "sha512-D+dyU0zXl4ZgilminLBY7/4rcGf/H/GqnbZ+iZPmQ0FELNUHvfWoJzcjVxDrNNZQ1j9/x7KN6+zxYVNiFhQe6A==", "license": "MIT", "dependencies": { "axios": "^1.7.7", @@ -10407,7 +10407,7 @@ "iconv-lite": "^0.6.3", "semver": "^7.6.3", "tar-stream": "^3.1.7", - "zigbee-herdsman": "^2.1.1" + "zigbee-herdsman": "^2.1.3" } }, "node_modules/zigbee2mqtt-frontend": { diff --git a/package.json b/package.json index 8f64ea36b..4e317cde1 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "winston-transport": "^4.8.0", "ws": "^8.18.0", "zigbee-herdsman": "2.1.3", - "zigbee-herdsman-converters": "20.20.0", + "zigbee-herdsman-converters": "20.21.0", "zigbee2mqtt-frontend": "0.7.4" }, "devDependencies": { diff --git a/test/bridge.test.js b/test/bridge.test.js index 20213507c..6315be39c 100644 --- a/test/bridge.test.js +++ b/test/bridge.test.js @@ -233,7 +233,7 @@ describe('Bridge', () => { it('Should publish devices on startup', async () => { await resetExtension(); - // console.log(MQTT.publish.mock.calls.find((c) => c[0] === 'zigbee2mqtt/bridge/devices')[1]) + // console.log(MQTT.publish.mock.calls.find((c) => c[0] === 'zigbee2mqtt/bridge/devices')[1]); expect(MQTT.publish).toHaveBeenCalledWith( 'zigbee2mqtt/bridge/devices', stringify([ @@ -318,6 +318,41 @@ describe('Bridge', () => { value_max: 454, value_min: 250, }, + { + access: 7, + description: 'Configure genLevelCtrl', + features: [ + { + access: 7, + description: + 'this setting can affect the "on_level", "current_level_startup" or "brightness" setting', + label: 'Execute if off', + name: 'execute_if_off', + property: 'execute_if_off', + type: 'binary', + value_off: false, + value_on: true, + }, + { + access: 7, + description: 'Defines the desired startup level for a device when it is supplied with power', + label: 'Current level startup', + name: 'current_level_startup', + presets: [ + {description: 'Use minimum permitted value', name: 'minimum', value: 0}, + {description: 'Use previous value', name: 'previous', value: 255}, + ], + property: 'current_level_startup', + type: 'numeric', + value_max: 254, + value_min: 1, + }, + ], + label: 'Level config', + name: 'level_config', + property: 'level_config', + type: 'composite', + }, ], type: 'light', }, @@ -1878,6 +1913,41 @@ describe('Bridge', () => { value_max: 454, value_min: 250, }, + { + access: 7, + description: 'Configure genLevelCtrl', + features: [ + { + access: 7, + description: + 'this setting can affect the "on_level", "current_level_startup" or "brightness" setting', + label: 'Execute if off', + name: 'execute_if_off', + property: 'execute_if_off', + type: 'binary', + value_off: false, + value_on: true, + }, + { + access: 7, + description: 'Defines the desired startup level for a device when it is supplied with power', + label: 'Current level startup', + name: 'current_level_startup', + presets: [ + {description: 'Use minimum permitted value', name: 'minimum', value: 0}, + {description: 'Use previous value', name: 'previous', value: 255}, + ], + property: 'current_level_startup', + type: 'numeric', + value_max: 254, + value_min: 1, + }, + ], + label: 'Level config', + name: 'level_config', + property: 'level_config', + type: 'composite', + }, ], type: 'light', }, @@ -2186,7 +2256,7 @@ describe('Bridge', () => { await zigbeeHerdsman.events.deviceInterview({device: zigbeeHerdsman.devices.unsupported, status: 'successful'}); await flushPromises(); expect(MQTT.publish).toHaveBeenCalledTimes(7); - // console.log(MQTT.publish.mock.calls.filter((c) => c[0] === 'zigbee2mqtt/bridge/event')) + // console.log(MQTT.publish.mock.calls.filter((c) => c[0] === 'zigbee2mqtt/bridge/event')); expect(MQTT.publish).toHaveBeenCalledWith( 'zigbee2mqtt/bridge/event', stringify({ @@ -2254,6 +2324,40 @@ describe('Bridge', () => { value_max: 454, value_min: 250, }, + { + access: 7, + description: 'Configure genLevelCtrl', + features: [ + { + access: 7, + description: `this setting can affect the "on_level", "current_level_startup" or "brightness" setting`, + label: 'Execute if off', + name: 'execute_if_off', + property: 'execute_if_off', + type: 'binary', + value_off: false, + value_on: true, + }, + { + access: 7, + description: 'Defines the desired startup level for a device when it is supplied with power', + label: 'Current level startup', + name: 'current_level_startup', + presets: [ + {description: 'Use minimum permitted value', name: 'minimum', value: 0}, + {description: 'Use previous value', name: 'previous', value: 255}, + ], + property: 'current_level_startup', + type: 'numeric', + value_max: 254, + value_min: 1, + }, + ], + label: 'Level config', + name: 'level_config', + property: 'level_config', + type: 'composite', + }, ], type: 'light', }, diff --git a/test/networkMap.test.js b/test/networkMap.test.js index fb192f8d6..c61cce944 100644 --- a/test/networkMap.test.js +++ b/test/networkMap.test.js @@ -201,7 +201,7 @@ describe('Networkmap', () => { description: 'TRADFRI bulb E26/E27, white spectrum, globe, opal, 980 lm', model: 'LED1545G12', supports: - 'light (state, brightness, color_temp, color_temp_startup), effect, power_on_behavior, color_options, identify, linkquality', + 'light (state, brightness, color_temp, color_temp_startup, level_config), effect, power_on_behavior, color_options, identify, linkquality', vendor: 'IKEA', }, failed: [], @@ -547,7 +547,7 @@ describe('Networkmap', () => { description: 'TRADFRI bulb E26/E27, white spectrum, globe, opal, 980 lm', model: 'LED1545G12', supports: - 'light (state, brightness, color_temp, color_temp_startup), effect, power_on_behavior, color_options, identify, linkquality', + 'light (state, brightness, color_temp, color_temp_startup, level_config), effect, power_on_behavior, color_options, identify, linkquality', vendor: 'IKEA', }, failed: [],