zigbee-herdsman-converters 14.0.372 → 14.0.373

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.
@@ -1915,6 +1915,8 @@ const converters = {
1915
1915
  }
1916
1916
  }
1917
1917
  }
1918
+
1919
+ return {state: {hue_power_on_behavior: value}};
1918
1920
  },
1919
1921
  },
1920
1922
  hue_power_on_error: {
@@ -35,7 +35,7 @@ module.exports = [
35
35
  vendor: 'Philips',
36
36
  description: 'Centura recessed spotlight',
37
37
  meta: {turnsOffAtBrightness1: true},
38
- extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
38
+ extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
39
39
  ota: ota.zigbeeOTA,
40
40
  },
41
41
  {
@@ -12,11 +12,15 @@ const fzLocal = {
12
12
  type: ['commandGetData', 'commandSetDataResponse', 'commandDataResponse'],
13
13
  convert: (model, msg, publish, options, meta) => {
14
14
  const dpValue = tuya.firstDpValue(msg, meta, 'ZMRM02');
15
- const button = dpValue.dp;
16
- const actionValue = tuya.getDataValue(dpValue);
17
- const lookup = {0: 'single', 1: 'double', 2: 'hold'};
18
- const action = lookup[actionValue];
19
- return {action: `button_${button}_${action}`};
15
+ if (dpValue.dp === 10) {
16
+ return {battery: tuya.getDataValue(dpValue)};
17
+ } else {
18
+ const button = dpValue.dp;
19
+ const actionValue = tuya.getDataValue(dpValue);
20
+ const lookup = {0: 'single', 1: 'double', 2: 'hold'};
21
+ const action = lookup[actionValue];
22
+ return {action: `button_${button}_${action}`};
23
+ }
20
24
  },
21
25
  },
22
26
  };
@@ -90,7 +94,7 @@ module.exports = [
90
94
  fromZigbee: [fzLocal.ZMRM02],
91
95
  toZigbee: [],
92
96
  onEvent: tuya.onEventSetTime,
93
- exposes: [e.action([
97
+ exposes: [e.battery(), e.action([
94
98
  'button_1_hold', 'button_1_single', 'button_1_double',
95
99
  'button_2_hold', 'button_2_single', 'button_2_double',
96
100
  'button_3_hold', 'button_3_single', 'button_3_double',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.372",
3
+ "version": "14.0.373",
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.372",
3
+ "version": "14.0.373",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [