zigbee-herdsman-converters 14.0.318 → 14.0.319

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -330,7 +330,7 @@ const converters = {
330
330
 
331
331
  let info;
332
332
  // https://github.com/Koenkk/zigbee2mqtt/issues/8310 some devices require the info to be reversed.
333
- if (['SIRZB-110', 'SRAC-23B-ZBSR', 'AV2010/29A'].includes(meta.mapped.model)) {
333
+ if (['SIRZB-110', 'SRAC-23B-ZBSR', 'AV2010/29A', 'AV2010/24A'].includes(meta.mapped.model)) {
334
334
  info = (mode[values.mode]) + ((values.strobe ? 1 : 0) << 4) + (level[values.level] << 6);
335
335
  } else {
336
336
  info = (mode[values.mode] << 4) + ((values.strobe ? 1 : 0) << 2) + (level[values.level]);
@@ -26,6 +26,26 @@ module.exports = [
26
26
  await reporting.activePower(endpoint);
27
27
  },
28
28
  },
29
+ {
30
+ zigbeeModel: ['4256050-ZHAC'],
31
+ model: '4256050-ZHAC',
32
+ vendor: 'Centralite',
33
+ description: '3-Series smart dimming outlet',
34
+ fromZigbee: [fz.restorable_brightness, fz.on_off, fz.electrical_measurement],
35
+ toZigbee: [tz.light_onoff_restorable_brightness],
36
+ exposes: [e.light_brightness(), e.power(), e.voltage(), e.current()],
37
+ configure: async (device, coordinatorEndpoint, logger) => {
38
+ const endpoint = device.getEndpoint(1);
39
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'haElectricalMeasurement']);
40
+ await reporting.onOff(endpoint);
41
+ // 4256050-ZHAC doesn't support reading 'acVoltageMultiplier' or 'acVoltageDivisor'
42
+ await endpoint.read('haElectricalMeasurement', ['acCurrentMultiplier', 'acCurrentDivisor']);
43
+ await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
44
+ await reporting.rmsVoltage(endpoint, {change: 2}); // Voltage reports in V
45
+ await reporting.rmsCurrent(endpoint, {change: 10}); // Current reports in mA
46
+ await reporting.activePower(endpoint, {change: 2}); // Power reports in 0.1W
47
+ },
48
+ },
29
49
  {
30
50
  zigbeeModel: ['4257050-ZHAC'],
31
51
  model: '4257050-ZHAC',
@@ -0,0 +1,48 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = require('../converters/fromZigbee');
3
+ const reporting = require('../lib/reporting');
4
+ const utils = require('../lib/utils');
5
+ const e = exposes.presets;
6
+
7
+ const jetHome = {
8
+ fz: {
9
+ multiStateAction: {
10
+ cluster: 'genMultistateInput',
11
+ type: ['attributeReport', 'readResponse'],
12
+ convert: (model, msg, publish, options, meta) => {
13
+ const actionLookup = {0: 'release', 1: 'single', 2: 'double', 3: 'triple', 4: 'hold'};
14
+ const value = msg.data['presentValue'];
15
+ const action = actionLookup[value];
16
+ return {action: utils.postfixWithEndpointName(action, msg, model)};
17
+ },
18
+ },
19
+ },
20
+ };
21
+
22
+ module.exports = [
23
+ {
24
+ fingerprint: [{modelID: 'WS7', manufacturerName: 'JetHome'}],
25
+ model: 'WS7',
26
+ vendor: 'JetHome',
27
+ description: '3-ch battery discrete input module',
28
+ fromZigbee: [fz.battery, jetHome.fz.multiStateAction],
29
+ toZigbee: [],
30
+ exposes: [
31
+ e.battery(), e.battery_voltage(), e.action(
32
+ ['release_in1', 'single_in1', 'double_in1', 'hold_in1',
33
+ 'release_in2', 'single_in2', 'double_in2', 'hold_in2',
34
+ 'release_in3', 'single_in3', 'double_in3', 'hold_in3'])],
35
+ configure: async (device, coordinatorEndpoint, logger) => {
36
+ const endpoint = device.getEndpoint(1);
37
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
38
+ await reporting.batteryVoltage(endpoint);
39
+ await reporting.batteryPercentageRemaining(endpoint);
40
+ },
41
+ meta: {multiEndpoint: true},
42
+ endpoint: (device) => {
43
+ return {
44
+ 'in1': 1, 'in2': 2, 'in3': 3,
45
+ };
46
+ },
47
+ },
48
+ ];
@@ -441,7 +441,7 @@ module.exports = [
441
441
  ota: ota.zigbeeOTA,
442
442
  },
443
443
  {
444
- zigbeeModel: ['LWA003'],
444
+ zigbeeModel: ['LWA003', 'LWW002'],
445
445
  model: '9290022268',
446
446
  vendor: 'Philips',
447
447
  description: 'Hue White A19 bulb with Bluetooth',
package/devices/tuya.js CHANGED
@@ -140,7 +140,9 @@ module.exports = [
140
140
  },
141
141
  {
142
142
  fingerprint: [{modelID: 'TS0501B', manufacturerName: '_TZ3000_4whigl8i'},
143
- {modelID: 'TS0501B', manufacturerName: '_TZ3210_4whigl8i'}, {modelID: 'TS0501B', manufacturerName: '_TZ3210_9q49basr'}],
143
+ {modelID: 'TS0501B', manufacturerName: '_TZ3210_4whigl8i'},
144
+ {modelID: 'TS0501B', manufacturerName: '_TZ3210_9q49basr'},
145
+ {modelID: 'TS0501B', manufacturerName: '_TZ3210_grnwgegn'}],
144
146
  model: 'TS0501B',
145
147
  description: 'Zigbee light',
146
148
  vendor: 'TuYa',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.318",
3
+ "version": "14.0.319",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.318",
3
+ "version": "14.0.319",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [