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.
- package/converters/toZigbee.js +2 -0
- package/devices/philips.js +1 -1
- package/devices/zemismart.js +10 -6
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/toZigbee.js
CHANGED
package/devices/philips.js
CHANGED
|
@@ -35,7 +35,7 @@ module.exports = [
|
|
|
35
35
|
vendor: 'Philips',
|
|
36
36
|
description: 'Centura recessed spotlight',
|
|
37
37
|
meta: {turnsOffAtBrightness1: true},
|
|
38
|
-
extend: hueExtend.
|
|
38
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
39
39
|
ota: ota.zigbeeOTA,
|
|
40
40
|
},
|
|
41
41
|
{
|
package/devices/zemismart.js
CHANGED
|
@@ -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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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',
|
package/npm-shrinkwrap.json
CHANGED