zigbee-herdsman-converters 15.0.41 → 15.0.43
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/fromZigbee.js +1 -12
- package/converters/toZigbee.js +2 -33
- package/devices/ajax_online.js +2 -1
- package/devices/aldi.js +6 -9
- package/devices/ecodim.js +3 -2
- package/devices/garza.js +2 -2
- package/devices/immax.js +1 -1
- package/devices/lidl.js +33 -73
- package/devices/lonsonho.js +3 -10
- package/devices/mercator.js +2 -5
- package/devices/miboxer.js +5 -27
- package/devices/moes.js +1 -12
- package/devices/mycket.js +2 -2
- package/devices/m/303/274ller_licht.js +3 -2
- package/devices/ozsmartthings.js +2 -2
- package/devices/skydance.js +4 -5
- package/devices/tuya.js +18 -29
- package/devices/urlighting.js +2 -2
- package/devices/woox.js +1 -2
- package/devices/xiaomi.js +34 -1
- package/lib/extend.js +32 -21
- package/lib/tuya.js +90 -0
- package/lib/xiaomi.js +1 -1
- package/package.json +3 -3
package/converters/fromZigbee.js
CHANGED
|
@@ -4773,17 +4773,6 @@ const converters = {
|
|
|
4773
4773
|
});
|
|
4774
4774
|
},
|
|
4775
4775
|
},
|
|
4776
|
-
tuya_min_brightness: {
|
|
4777
|
-
cluster: 'genLevelCtrl',
|
|
4778
|
-
type: ['attributeReport', 'readResponse'],
|
|
4779
|
-
convert: (model, msg, publish, options, meta) => {
|
|
4780
|
-
if (msg.data.hasOwnProperty(0xfc00)) {
|
|
4781
|
-
const property = postfixWithEndpointName('min_brightness', msg, model, meta);
|
|
4782
|
-
const value = parseInt(msg.data[0xfc00].toString(16).slice(0, 2), 16);
|
|
4783
|
-
return {[property]: value};
|
|
4784
|
-
}
|
|
4785
|
-
},
|
|
4786
|
-
},
|
|
4787
4776
|
restorable_brightness: {
|
|
4788
4777
|
cluster: 'genLevelCtrl',
|
|
4789
4778
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -5461,7 +5450,7 @@ const converters = {
|
|
|
5461
5450
|
if (['QBKG39LM', 'QBKG41LM', 'WS-EUK02', 'WS-EUK04', 'QBKG20LM', 'QBKG31LM'].includes(model.model)) {
|
|
5462
5451
|
buttonLookup = {41: 'left', 42: 'right', 51: 'both'};
|
|
5463
5452
|
}
|
|
5464
|
-
if (['QBKG25LM', 'QBKG26LM', 'QBKG34LM'].includes(model.model)) {
|
|
5453
|
+
if (['QBKG25LM', 'QBKG26LM', 'QBKG34LM', 'ZNQBKG31LM'].includes(model.model)) {
|
|
5465
5454
|
buttonLookup = {
|
|
5466
5455
|
41: 'left', 42: 'center', 43: 'right',
|
|
5467
5456
|
51: 'left_center', 52: 'left_right', 53: 'center_right',
|
package/converters/toZigbee.js
CHANGED
|
@@ -2145,7 +2145,7 @@ const converters = {
|
|
|
2145
2145
|
if (['SP-EUC01', 'ZNCZ04LM', 'ZNCZ12LM', 'ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM', 'SSM-U01', 'SSM-U02', 'DLKZMK11LM', 'DLKZMK12LM',
|
|
2146
2146
|
'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
|
|
2147
2147
|
'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM', 'ZNLDP13LM',
|
|
2148
|
-
'WS-USC02', 'WS-USC04',
|
|
2148
|
+
'WS-USC02', 'WS-USC04', 'ZNQBKG31LM',
|
|
2149
2149
|
].includes(meta.mapped.model)) {
|
|
2150
2150
|
await entity.write('aqaraOpple', {0x0201: {value: value ? 1 : 0, type: 0x10}}, manufacturerOptions.xiaomi);
|
|
2151
2151
|
} else if (['ZNCZ02LM', 'QBCZ11LM', 'LLKZMK11LM'].includes(meta.mapped.model)) {
|
|
@@ -2170,7 +2170,7 @@ const converters = {
|
|
|
2170
2170
|
if (['SP-EUC01', 'ZNCZ04LM', 'ZNCZ12LM', 'ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM', 'SSM-U01', 'SSM-U02', 'DLKZMK11LM', 'DLKZMK12LM',
|
|
2171
2171
|
'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
|
|
2172
2172
|
'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM', 'ZNLDP13LM',
|
|
2173
|
-
'WS-USC02', 'WS-USC04',
|
|
2173
|
+
'WS-USC02', 'WS-USC04', 'ZNQBKG31LM',
|
|
2174
2174
|
].includes(meta.mapped.model)) {
|
|
2175
2175
|
await entity.read('aqaraOpple', [0x0201]);
|
|
2176
2176
|
} else if (['ZNCZ02LM', 'QBCZ11LM', 'ZNCZ11LM'].includes(meta.mapped.model)) {
|
|
@@ -3828,20 +3828,6 @@ const converters = {
|
|
|
3828
3828
|
return {state: {state: value.toUpperCase()}};
|
|
3829
3829
|
},
|
|
3830
3830
|
},
|
|
3831
|
-
tuya_min_brightness: {
|
|
3832
|
-
key: ['min_brightness'],
|
|
3833
|
-
convertSet: async (entity, key, value, meta) => {
|
|
3834
|
-
const minValueHex = value.toString(16);
|
|
3835
|
-
const maxValueHex = 'ff';
|
|
3836
|
-
const minMaxValue = parseInt(`${minValueHex}${maxValueHex}`, 16);
|
|
3837
|
-
const payload = {0xfc00: {value: minMaxValue, type: 0x21}};
|
|
3838
|
-
await entity.write('genLevelCtrl', payload, {disableDefaultResponse: true});
|
|
3839
|
-
return {state: {min_brightness: value}};
|
|
3840
|
-
},
|
|
3841
|
-
convertGet: async (entity, key, meta) => {
|
|
3842
|
-
await entity.read('genLevelCtrl', [0xfc00]);
|
|
3843
|
-
},
|
|
3844
|
-
},
|
|
3845
3831
|
frankever_threshold: {
|
|
3846
3832
|
key: ['threshold'],
|
|
3847
3833
|
convertSet: async (entity, key, value, meta) => {
|
|
@@ -6622,23 +6608,6 @@ const converters = {
|
|
|
6622
6608
|
}
|
|
6623
6609
|
},
|
|
6624
6610
|
},
|
|
6625
|
-
tuya_do_not_disturb: {
|
|
6626
|
-
key: ['do_not_disturb'],
|
|
6627
|
-
convertSet: async (entity, key, value, meta) => {
|
|
6628
|
-
await entity.command('lightingColorCtrl', 'tuyaDoNotDisturb', {enable: value ? 1 : 0});
|
|
6629
|
-
return {state: {do_not_disturb: value}};
|
|
6630
|
-
},
|
|
6631
|
-
},
|
|
6632
|
-
tuya_color_power_on_behavior: {
|
|
6633
|
-
key: ['color_power_on_behavior'],
|
|
6634
|
-
convertSet: async (entity, key, value, meta) => {
|
|
6635
|
-
const lookup = {'initial': 0, 'previous': 1, 'cutomized': 2};
|
|
6636
|
-
utils.validateValue(value, Object.keys(lookup));
|
|
6637
|
-
await entity.command('lightingColorCtrl', 'tuyaOnStartUp', {
|
|
6638
|
-
mode: lookup[value]*256, data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]});
|
|
6639
|
-
return {state: {color_power_on_behavior: value}};
|
|
6640
|
-
},
|
|
6641
|
-
},
|
|
6642
6611
|
tuya_motion_sensor: {
|
|
6643
6612
|
key: ['o_sensitivity', 'v_sensitivity', 'led_status', 'vacancy_delay',
|
|
6644
6613
|
'light_on_luminance_prefer', 'light_off_luminance_prefer', 'mode'],
|
package/devices/ajax_online.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const extend = require('../lib/extend');
|
|
2
|
+
const tuya = require('../lib/tuya');
|
|
2
3
|
|
|
3
4
|
module.exports = [
|
|
4
5
|
{
|
|
@@ -35,7 +36,7 @@ module.exports = [
|
|
|
35
36
|
model: 'AJ_RGBCCT_CTRL',
|
|
36
37
|
vendor: 'Ajax Online',
|
|
37
38
|
description: 'Smart Zigbee LED strip RGB+CCT',
|
|
38
|
-
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]
|
|
39
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
39
40
|
meta: {applyRedFix: true, enhancedHue: false},
|
|
40
41
|
},
|
|
41
42
|
{
|
package/devices/aldi.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
-
const
|
|
3
|
+
const tuya = require('../lib/tuya');
|
|
4
4
|
const e = exposes.presets;
|
|
5
5
|
|
|
6
6
|
module.exports = [
|
|
@@ -9,7 +9,7 @@ module.exports = [
|
|
|
9
9
|
model: 'L122FF63H11A5.0W',
|
|
10
10
|
vendor: 'Aldi',
|
|
11
11
|
description: 'LIGHTWAY smart home LED-lamp - spot',
|
|
12
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
12
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
13
13
|
meta: {applyRedFix: true},
|
|
14
14
|
},
|
|
15
15
|
{
|
|
@@ -17,31 +17,28 @@ module.exports = [
|
|
|
17
17
|
model: 'L122AA63H11A6.5W',
|
|
18
18
|
vendor: 'Aldi',
|
|
19
19
|
description: 'LIGHTWAY smart home LED-lamp - candle',
|
|
20
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
21
|
-
meta: {applyRedFix: true},
|
|
20
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
22
21
|
},
|
|
23
22
|
{
|
|
24
23
|
fingerprint: [{modelID: 'TS0502B', manufacturerName: '_TZ3000_g1glzzfk'}],
|
|
25
24
|
model: 'F122SB62H22A4.5W',
|
|
26
25
|
vendor: 'Aldi',
|
|
27
26
|
description: 'LIGHTWAY smart home LED-lamp - filament',
|
|
28
|
-
extend: extend.light_onoff_brightness_colortemp(
|
|
27
|
+
extend: tuya.extend.light_onoff_brightness_colortemp(),
|
|
29
28
|
},
|
|
30
29
|
{
|
|
31
30
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_v1srfw9x'}],
|
|
32
31
|
model: 'C422AC11D41H140.0W',
|
|
33
32
|
vendor: 'Aldi',
|
|
34
33
|
description: 'MEGOS LED panel RGB+CCT 40W 3600lm 62 x 62 cm',
|
|
35
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
36
|
-
meta: {applyRedFix: true},
|
|
34
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
37
35
|
},
|
|
38
36
|
{
|
|
39
37
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_gb5gaeca'}],
|
|
40
38
|
model: 'C422AC14D41H140.0W',
|
|
41
39
|
vendor: 'Aldi',
|
|
42
40
|
description: 'MEGOS LED panel RGB+CCT 40W 3600lm 30 x 120 cm',
|
|
43
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
44
|
-
meta: {applyRedFix: true},
|
|
41
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
45
42
|
},
|
|
46
43
|
{
|
|
47
44
|
fingerprint: [{modelID: 'TS1001', manufacturerName: '_TZ3000_ztrfrcsu'}],
|
package/devices/ecodim.js
CHANGED
|
@@ -4,6 +4,7 @@ const e = exposes.presets;
|
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
6
|
const ota = require('../lib/ota');
|
|
7
|
+
const tuya = require('../lib/tuya');
|
|
7
8
|
|
|
8
9
|
module.exports = [
|
|
9
10
|
{
|
|
@@ -131,7 +132,7 @@ module.exports = [
|
|
|
131
132
|
model: 'ED-10042',
|
|
132
133
|
vendor: 'EcoDim',
|
|
133
134
|
description: 'Zigbee LED filament light dimmable E27, globe G125, flame 2200K',
|
|
134
|
-
extend: extend.light_onoff_brightness(),
|
|
135
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
135
136
|
},
|
|
136
137
|
{
|
|
137
138
|
fingerprint: [{modelID: 'CCT Light', manufacturerName: 'ZigBee/CCT', manufacturerID: 4137},
|
|
@@ -139,6 +140,6 @@ module.exports = [
|
|
|
139
140
|
model: 'ED-10041',
|
|
140
141
|
vendor: 'EcoDim',
|
|
141
142
|
description: 'Zigbee LED filament light dimmable E27, edison ST64, flame 2200K',
|
|
142
|
-
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
143
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
143
144
|
},
|
|
144
145
|
];
|
package/devices/garza.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const tuya = require('../lib/tuya');
|
|
2
2
|
|
|
3
3
|
module.exports = [
|
|
4
4
|
{
|
|
@@ -6,6 +6,6 @@ module.exports = [
|
|
|
6
6
|
model: 'Garza-Standard-A60',
|
|
7
7
|
vendor: 'Garza Smart',
|
|
8
8
|
description: 'Standard A60 bulb',
|
|
9
|
-
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
9
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
10
10
|
},
|
|
11
11
|
];
|
package/devices/immax.js
CHANGED
|
@@ -58,7 +58,7 @@ module.exports = [
|
|
|
58
58
|
model: '07743L',
|
|
59
59
|
vendor: 'Immax',
|
|
60
60
|
description: 'Neo Smart LED E27 11W RGB + CCT, color, dimmable, Zigbee 3.0',
|
|
61
|
-
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
61
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
zigbeeModel: ['Keyfob-ZB3.0'],
|
package/devices/lidl.js
CHANGED
|
@@ -2,7 +2,6 @@ const exposes = require('../lib/exposes');
|
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
|
-
const extend = require('../lib/extend');
|
|
6
5
|
const e = exposes.presets;
|
|
7
6
|
const ea = exposes.access;
|
|
8
7
|
const tuya = require('../lib/tuya');
|
|
@@ -372,7 +371,7 @@ module.exports = [
|
|
|
372
371
|
model: 'HG06337',
|
|
373
372
|
vendor: 'Lidl',
|
|
374
373
|
description: 'Silvercrest smart plug (EU, CH, FR, BS, DK)',
|
|
375
|
-
extend: extend.switch(),
|
|
374
|
+
extend: tuya.extend.switch(),
|
|
376
375
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
377
376
|
const endpoint = device.getEndpoint(11);
|
|
378
377
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
@@ -493,8 +492,7 @@ module.exports = [
|
|
|
493
492
|
model: 'HG06338',
|
|
494
493
|
vendor: 'Lidl',
|
|
495
494
|
description: 'Silvercrest 3 gang switch, with 4 USB (EU, FR, CZ, BS)',
|
|
496
|
-
|
|
497
|
-
extend: extend.switch(),
|
|
495
|
+
extend: tuya.extend.switch({endpoints: ['l1', 'l2', 'l3']}),
|
|
498
496
|
meta: {multiEndpoint: true},
|
|
499
497
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
500
498
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
@@ -511,8 +509,7 @@ module.exports = [
|
|
|
511
509
|
model: 'HG06104A',
|
|
512
510
|
vendor: 'Lidl',
|
|
513
511
|
description: 'Livarno Lux smart LED light strip 2.5m',
|
|
514
|
-
|
|
515
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
512
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({noConfigure: true}),
|
|
516
513
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
517
514
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
518
515
|
},
|
|
@@ -531,8 +528,7 @@ module.exports = [
|
|
|
531
528
|
model: 'HG06106B',
|
|
532
529
|
vendor: 'Lidl',
|
|
533
530
|
description: 'Livarno Lux E14 candle RGB',
|
|
534
|
-
|
|
535
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
531
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({noConfigure: true}),
|
|
536
532
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
537
533
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
538
534
|
},
|
|
@@ -542,9 +538,7 @@ module.exports = [
|
|
|
542
538
|
model: '14153806L',
|
|
543
539
|
vendor: 'Lidl',
|
|
544
540
|
description: 'Livarno smart LED ceiling light',
|
|
545
|
-
|
|
546
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
547
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
541
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
548
542
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
549
543
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
550
544
|
},
|
|
@@ -554,9 +548,7 @@ module.exports = [
|
|
|
554
548
|
model: '14156506L',
|
|
555
549
|
vendor: 'Lidl',
|
|
556
550
|
description: 'Livarno Lux smart LED mood light',
|
|
557
|
-
|
|
558
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
559
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
551
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
560
552
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
561
553
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
562
554
|
},
|
|
@@ -566,9 +558,7 @@ module.exports = [
|
|
|
566
558
|
model: '14156408L',
|
|
567
559
|
vendor: 'Lidl',
|
|
568
560
|
description: 'Livarno Lux smart LED ceiling light',
|
|
569
|
-
|
|
570
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
571
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
561
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
572
562
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
573
563
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 16});
|
|
574
564
|
},
|
|
@@ -578,9 +568,7 @@ module.exports = [
|
|
|
578
568
|
model: 'HG08010',
|
|
579
569
|
vendor: 'Lidl',
|
|
580
570
|
description: 'Livarno Home outdoor spotlight',
|
|
581
|
-
|
|
582
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
583
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
571
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
584
572
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
585
573
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
586
574
|
},
|
|
@@ -590,9 +578,7 @@ module.exports = [
|
|
|
590
578
|
model: 'HG08008',
|
|
591
579
|
vendor: 'Lidl',
|
|
592
580
|
description: 'Livarno Home LED ceiling light',
|
|
593
|
-
|
|
594
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
595
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
581
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
596
582
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
597
583
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
598
584
|
},
|
|
@@ -602,18 +588,14 @@ module.exports = [
|
|
|
602
588
|
model: 'HG08007',
|
|
603
589
|
vendor: 'TuYa',
|
|
604
590
|
description: 'Livarno Home outdoor LED band',
|
|
605
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
606
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
607
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
591
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
608
592
|
},
|
|
609
593
|
{
|
|
610
594
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3210_z1vlyufu'}],
|
|
611
595
|
model: '14158704L',
|
|
612
596
|
vendor: 'Lidl',
|
|
613
597
|
description: 'Livarno Home LED floor lamp, RGBW',
|
|
614
|
-
|
|
615
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
616
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
598
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
617
599
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
618
600
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
619
601
|
},
|
|
@@ -623,9 +605,7 @@ module.exports = [
|
|
|
623
605
|
model: '14158804L',
|
|
624
606
|
vendor: 'Lidl',
|
|
625
607
|
description: 'Livarno Home LED desk lamp RGBW',
|
|
626
|
-
|
|
627
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
628
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
608
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
629
609
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
630
610
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
631
611
|
},
|
|
@@ -635,9 +615,7 @@ module.exports = [
|
|
|
635
615
|
model: 'HG07834A',
|
|
636
616
|
vendor: 'Lidl',
|
|
637
617
|
description: 'Livarno Lux GU10 spot RGB',
|
|
638
|
-
|
|
639
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
640
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
618
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
641
619
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
642
620
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
643
621
|
},
|
|
@@ -648,9 +626,7 @@ module.exports = [
|
|
|
648
626
|
model: 'HG07834B',
|
|
649
627
|
vendor: 'Lidl',
|
|
650
628
|
description: 'Livarno Lux E14 candle RGB',
|
|
651
|
-
|
|
652
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
653
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
629
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
654
630
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
655
631
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
656
632
|
},
|
|
@@ -660,9 +636,7 @@ module.exports = [
|
|
|
660
636
|
model: 'HG08131C',
|
|
661
637
|
vendor: 'Lidl',
|
|
662
638
|
description: 'Livarno Home outdoor E27 bulb in set with flare',
|
|
663
|
-
|
|
664
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
665
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
639
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
666
640
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
667
641
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
668
642
|
},
|
|
@@ -672,8 +646,7 @@ module.exports = [
|
|
|
672
646
|
model: 'HG06106A',
|
|
673
647
|
vendor: 'Lidl',
|
|
674
648
|
description: 'Livarno Lux GU10 spot RGB',
|
|
675
|
-
|
|
676
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
649
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({noConfigure: true}),
|
|
677
650
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
678
651
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
679
652
|
},
|
|
@@ -683,8 +656,7 @@ module.exports = [
|
|
|
683
656
|
model: 'HG06106C',
|
|
684
657
|
vendor: 'Lidl',
|
|
685
658
|
description: 'Livarno Lux E27 bulb RGB',
|
|
686
|
-
|
|
687
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
659
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({noConfigure: true}),
|
|
688
660
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
689
661
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
690
662
|
},
|
|
@@ -694,9 +666,7 @@ module.exports = [
|
|
|
694
666
|
model: 'HG07834C',
|
|
695
667
|
vendor: 'Lidl',
|
|
696
668
|
description: 'Livarno Lux E27 bulb RGB',
|
|
697
|
-
|
|
698
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
699
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
669
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
700
670
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
701
671
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
702
672
|
},
|
|
@@ -706,7 +676,7 @@ module.exports = [
|
|
|
706
676
|
model: 'HG06492A',
|
|
707
677
|
vendor: 'Lidl',
|
|
708
678
|
description: 'Livarno Lux GU10 spot CCT',
|
|
709
|
-
|
|
679
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500], noConfigure: true}),
|
|
710
680
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
711
681
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 16});
|
|
712
682
|
},
|
|
@@ -716,8 +686,7 @@ module.exports = [
|
|
|
716
686
|
model: 'HG06492B',
|
|
717
687
|
vendor: 'Lidl',
|
|
718
688
|
description: 'Livarno Lux E14 candle CCT',
|
|
719
|
-
|
|
720
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 500]}),
|
|
689
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500], noConfigure: true}),
|
|
721
690
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
722
691
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 16});
|
|
723
692
|
},
|
|
@@ -727,7 +696,7 @@ module.exports = [
|
|
|
727
696
|
model: 'HG06492C',
|
|
728
697
|
vendor: 'Lidl',
|
|
729
698
|
description: 'Livarno Lux E27 bulb CCT',
|
|
730
|
-
|
|
699
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500], noConfigure: true}),
|
|
731
700
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
732
701
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 16});
|
|
733
702
|
},
|
|
@@ -738,7 +707,7 @@ module.exports = [
|
|
|
738
707
|
model: '14147206L',
|
|
739
708
|
vendor: 'Lidl',
|
|
740
709
|
description: 'Livarno Lux ceiling light',
|
|
741
|
-
|
|
710
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500], noConfigure: true}),
|
|
742
711
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
743
712
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 16});
|
|
744
713
|
},
|
|
@@ -748,8 +717,7 @@ module.exports = [
|
|
|
748
717
|
model: '14153905L',
|
|
749
718
|
vendor: 'Lidl',
|
|
750
719
|
description: 'Livarno Home LED floor lamp',
|
|
751
|
-
|
|
752
|
-
{disableColorTempStartup: true, disablePowerOnBehavior: true, colorTempRange: [153, 333]}),
|
|
720
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 333], noConfigure: true}),
|
|
753
721
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
754
722
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 16});
|
|
755
723
|
},
|
|
@@ -759,8 +727,7 @@ module.exports = [
|
|
|
759
727
|
model: '14148906L',
|
|
760
728
|
vendor: 'Lidl',
|
|
761
729
|
description: 'Livarno Lux mood light RGB+CCT',
|
|
762
|
-
|
|
763
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
730
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({noConfigure: true}),
|
|
764
731
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
765
732
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
766
733
|
},
|
|
@@ -771,8 +738,7 @@ module.exports = [
|
|
|
771
738
|
model: '14149505L/14149506L',
|
|
772
739
|
vendor: 'Lidl',
|
|
773
740
|
description: 'Livarno Lux light bar RGB+CCT (black/white)',
|
|
774
|
-
|
|
775
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
741
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({noConfigure: true}),
|
|
776
742
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
777
743
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
|
778
744
|
},
|
|
@@ -794,7 +760,7 @@ module.exports = [
|
|
|
794
760
|
model: 'HG06463A',
|
|
795
761
|
vendor: 'Lidl',
|
|
796
762
|
description: 'Livarno Lux E27 ST64 filament bulb',
|
|
797
|
-
extend: extend.light_onoff_brightness(
|
|
763
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
798
764
|
meta: {turnsOffAtBrightness1: false},
|
|
799
765
|
},
|
|
800
766
|
{
|
|
@@ -802,7 +768,7 @@ module.exports = [
|
|
|
802
768
|
model: 'HG06463B',
|
|
803
769
|
vendor: 'Lidl',
|
|
804
770
|
description: 'Livarno Lux E27 G95 filament bulb',
|
|
805
|
-
extend: extend.light_onoff_brightness(
|
|
771
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
806
772
|
meta: {turnsOffAtBrightness1: false},
|
|
807
773
|
},
|
|
808
774
|
{
|
|
@@ -810,7 +776,7 @@ module.exports = [
|
|
|
810
776
|
model: 'HG06620',
|
|
811
777
|
vendor: 'Lidl',
|
|
812
778
|
description: 'Silvercrest garden spike with 2 sockets',
|
|
813
|
-
extend: extend.switch(),
|
|
779
|
+
extend: tuya.extend.switch(),
|
|
814
780
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
815
781
|
const endpoint = device.getEndpoint(1);
|
|
816
782
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
@@ -825,7 +791,7 @@ module.exports = [
|
|
|
825
791
|
model: 'HG06462A',
|
|
826
792
|
vendor: 'Lidl',
|
|
827
793
|
description: 'Livarno Lux E27 A60 filament bulb',
|
|
828
|
-
extend: extend.light_onoff_brightness(
|
|
794
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
829
795
|
meta: {turnsOffAtBrightness1: false},
|
|
830
796
|
},
|
|
831
797
|
{
|
|
@@ -833,7 +799,7 @@ module.exports = [
|
|
|
833
799
|
model: 'HG06619',
|
|
834
800
|
vendor: 'Lidl',
|
|
835
801
|
description: 'Silvercrest outdoor plug',
|
|
836
|
-
extend: extend.switch(),
|
|
802
|
+
extend: tuya.extend.switch(),
|
|
837
803
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
838
804
|
const endpoint = device.getEndpoint(1);
|
|
839
805
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
@@ -845,18 +811,14 @@ module.exports = [
|
|
|
845
811
|
model: 'HG08633',
|
|
846
812
|
vendor: 'Lidl',
|
|
847
813
|
description: 'Livarno gardenspot RGB',
|
|
848
|
-
extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true, preferHS: true, colorTempRange: [153, 500],
|
|
849
|
-
disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
850
|
-
meta: {enhancedHue: false},
|
|
814
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({supportsHS: true, preferHS: true, colorTempRange: [153, 500]}),
|
|
851
815
|
},
|
|
852
816
|
{
|
|
853
817
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_bwlvyjwk'}],
|
|
854
818
|
model: 'HG08383B',
|
|
855
819
|
vendor: 'Lidl',
|
|
856
820
|
description: 'Livarno outdoor LED light chain',
|
|
857
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
858
|
-
{colorTempRange: [153, 500], disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
859
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
821
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
860
822
|
},
|
|
861
823
|
{
|
|
862
824
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_chyvmhay'}],
|
|
@@ -919,8 +881,6 @@ module.exports = [
|
|
|
919
881
|
model: 'HG08383A',
|
|
920
882
|
vendor: 'Lidl',
|
|
921
883
|
description: 'Livarno outdoor LED light chain',
|
|
922
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
923
|
-
{colorTempRange: [153, 500], disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
924
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
884
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
925
885
|
},
|
|
926
886
|
];
|
package/devices/lonsonho.js
CHANGED
|
@@ -112,27 +112,20 @@ module.exports = [
|
|
|
112
112
|
model: 'QS-Zigbee-D02-TRIAC-LN',
|
|
113
113
|
vendor: 'Lonsonho',
|
|
114
114
|
description: '1 gang smart dimmer switch module with neutral',
|
|
115
|
-
|
|
116
|
-
.fromZigbee.concat([fz.tuya_min_brightness]),
|
|
117
|
-
toZigbee: extend.light_onoff_brightness({disableMoveStep: true, disableTransition: true})
|
|
118
|
-
.toZigbee.concat([tz.tuya_min_brightness]),
|
|
119
|
-
exposes: [e.light_brightness().withMinBrightness()],
|
|
115
|
+
extend: tuya.extend.light_onoff_brightness({disableMoveStep: true, disableTransition: true, minBrightness: true}),
|
|
120
116
|
},
|
|
121
117
|
{
|
|
122
118
|
fingerprint: [{modelID: 'TS110F', manufacturerName: '_TYZB01_v8gtiaed'}],
|
|
123
119
|
model: 'QS-Zigbee-D02-TRIAC-2C-LN',
|
|
124
120
|
vendor: 'Lonsonho',
|
|
125
121
|
description: '2 gang smart dimmer switch module with neutral',
|
|
126
|
-
|
|
127
|
-
toZigbee: extend.light_onoff_brightness().toZigbee.concat([tz.tuya_min_brightness]),
|
|
128
|
-
exposes: [e.light_brightness().withMinBrightness().withEndpoint('l1'),
|
|
129
|
-
e.light_brightness().withMinBrightness().withEndpoint('l2')],
|
|
122
|
+
extend: tuya.extend.light_onoff_brightness({minBrightness: true, endpoints: ['l1', 'l2'], noConfigure: true}),
|
|
130
123
|
endpoint: (device) => {
|
|
131
124
|
return {'l1': 1, 'l2': 2};
|
|
132
125
|
},
|
|
133
126
|
meta: {multiEndpoint: true},
|
|
134
127
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
135
|
-
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
128
|
+
await tuya.extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
136
129
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
137
130
|
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
138
131
|
// Don't do: await reporting.onOff(endpoint); https://github.com/Koenkk/zigbee2mqtt/issues/6041
|
package/devices/mercator.js
CHANGED
|
@@ -3,7 +3,6 @@ const fz = require('../converters/fromZigbee');
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const tuya = require('../lib/tuya');
|
|
6
|
-
const extend = require('../lib/extend');
|
|
7
6
|
const e = exposes.presets;
|
|
8
7
|
const ea = exposes.access;
|
|
9
8
|
|
|
@@ -78,16 +77,14 @@ module.exports = [
|
|
|
78
77
|
model: 'SMCL01-ZB',
|
|
79
78
|
vendor: 'Mercator',
|
|
80
79
|
description: 'Ikuü Ikon ceiling light CCT',
|
|
81
|
-
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]
|
|
80
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
|
|
82
81
|
},
|
|
83
82
|
{
|
|
84
83
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_xr5m6kfg'}],
|
|
85
84
|
model: 'SMD4109W-RGB-ZB',
|
|
86
85
|
vendor: 'Mercator',
|
|
87
86
|
description: 'Ikuü Walter downlight RGB + CCT',
|
|
88
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
89
|
-
{colorTempRange: [153, 500], disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
90
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
87
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
91
88
|
},
|
|
92
89
|
{
|
|
93
90
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3210_raqjcxo5'}],
|
package/devices/miboxer.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
2
|
const fz = require('../converters/fromZigbee');
|
|
3
|
-
const tz = require('../converters/toZigbee');
|
|
4
3
|
const e = exposes.presets;
|
|
5
|
-
const ea = exposes.access;
|
|
6
|
-
const extend = require('../lib/extend');
|
|
7
4
|
const tuya = require('../lib/tuya');
|
|
8
5
|
|
|
9
6
|
module.exports = [
|
|
@@ -12,33 +9,14 @@ module.exports = [
|
|
|
12
9
|
model: 'FUT066Z',
|
|
13
10
|
vendor: 'MiBoxer',
|
|
14
11
|
description: 'RGB+CCT LED Downlight',
|
|
15
|
-
|
|
16
|
-
tz.tuya_do_not_disturb, tz.tuya_color_power_on_behavior]),
|
|
17
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
18
|
-
fromZigbee: extend.light_onoff_brightness_colortemp_color().fromZigbee,
|
|
19
|
-
exposes: [e.light_brightness_colortemp_colorhs([153, 500]).removeFeature('color_temp_startup'),
|
|
20
|
-
exposes.binary('do_not_disturb', ea.STATE_SET, true, false)
|
|
21
|
-
.withDescription('Do not disturb mode'),
|
|
22
|
-
exposes.enum('color_power_on_behavior', ea.STATE_SET, ['initial', 'previous', 'cutomized'])
|
|
23
|
-
.withDescription('Power on behavior state'),
|
|
24
|
-
],
|
|
12
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
25
13
|
},
|
|
26
14
|
{
|
|
27
15
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3210_jicmoite'}],
|
|
28
16
|
model: 'FUT039Z',
|
|
29
17
|
vendor: 'Miboxer',
|
|
30
18
|
description: 'RGB+CCT LED controller',
|
|
31
|
-
|
|
32
|
-
tz.tuya_do_not_disturb, tz.tuya_color_power_on_behavior,
|
|
33
|
-
]),
|
|
34
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
35
|
-
fromZigbee: extend.light_onoff_brightness_colortemp_color().fromZigbee,
|
|
36
|
-
exposes: [e.light_brightness_colortemp_colorhs([153, 500]).removeFeature('color_temp_startup'),
|
|
37
|
-
exposes.binary('do_not_disturb', ea.STATE_SET, true, false)
|
|
38
|
-
.withDescription('Do not disturb mode'),
|
|
39
|
-
exposes.enum('color_power_on_behavior', ea.STATE_SET, ['initial', 'previous', 'cutomized'])
|
|
40
|
-
.withDescription('Power on behavior state'),
|
|
41
|
-
],
|
|
19
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
42
20
|
},
|
|
43
21
|
{
|
|
44
22
|
fingerprint: [{modelID: 'TS0501B', manufacturerName: '_TZ3210_dxroobu3'},
|
|
@@ -46,7 +24,7 @@ module.exports = [
|
|
|
46
24
|
model: 'FUT036Z',
|
|
47
25
|
description: 'Single color LED controller',
|
|
48
26
|
vendor: 'Miboxer',
|
|
49
|
-
extend: extend.light_onoff_brightness(
|
|
27
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
50
28
|
onEvent: tuya.onEventSetTime,
|
|
51
29
|
},
|
|
52
30
|
{
|
|
@@ -58,14 +36,14 @@ module.exports = [
|
|
|
58
36
|
model: 'FUT035Z',
|
|
59
37
|
description: 'Dual white LED controller',
|
|
60
38
|
vendor: 'Miboxer',
|
|
61
|
-
extend: extend.light_onoff_brightness_colortemp({
|
|
39
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
|
|
62
40
|
},
|
|
63
41
|
{
|
|
64
42
|
fingerprint: [{modelID: 'TS0504B', manufacturerName: '_TZ3210_ttkgurpb'}],
|
|
65
43
|
model: 'FUT038Z',
|
|
66
44
|
description: 'RGBW LED controller',
|
|
67
45
|
vendor: 'Miboxer',
|
|
68
|
-
extend: extend.light_onoff_brightness_colortemp_color({
|
|
46
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
69
47
|
},
|
|
70
48
|
{
|
|
71
49
|
fingerprint: [{modelID: 'TS1002', manufacturerName: '_TZ3000_xwh1e22x'}],
|
package/devices/moes.js
CHANGED
|
@@ -338,18 +338,7 @@ module.exports = [
|
|
|
338
338
|
model: 'ZLD-RCW',
|
|
339
339
|
vendor: 'Moes',
|
|
340
340
|
description: 'RGB+CCT Zigbee LED Controller',
|
|
341
|
-
|
|
342
|
-
tz.tuya_do_not_disturb, tz.tuya_color_power_on_behavior,
|
|
343
|
-
]),
|
|
344
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
345
|
-
fromZigbee: extend.light_onoff_brightness_colortemp_color().fromZigbee,
|
|
346
|
-
exposes: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], disableColorTempStartup: true,
|
|
347
|
-
disablePowerOnBehavior: true}).exposes.concat([
|
|
348
|
-
exposes.binary('do_not_disturb', ea.STATE_SET, true, false)
|
|
349
|
-
.withDescription('Do not disturb mode'),
|
|
350
|
-
exposes.enum('color_power_on_behavior', ea.STATE_SET, ['initial', 'previous', 'cutomized'])
|
|
351
|
-
.withDescription('Power on behavior state'),
|
|
352
|
-
]),
|
|
341
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
353
342
|
},
|
|
354
343
|
{
|
|
355
344
|
fingerprint: [{modelID: 'TS130F', manufacturerName: '_TZ3000_1dd0d5yi'}],
|
package/devices/mycket.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const tuya = require('../lib/tuya');
|
|
2
2
|
|
|
3
3
|
module.exports = [
|
|
4
4
|
{
|
|
@@ -6,6 +6,6 @@ module.exports = [
|
|
|
6
6
|
model: 'MS-SP-LE27WRGB',
|
|
7
7
|
description: 'E27 RGBW bulb',
|
|
8
8
|
vendor: 'Mycket',
|
|
9
|
-
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
9
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
10
10
|
},
|
|
11
11
|
];
|
|
@@ -3,6 +3,7 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
|
+
const tuya = require('../lib/tuya');
|
|
6
7
|
const e = exposes.presets;
|
|
7
8
|
|
|
8
9
|
module.exports = [
|
|
@@ -113,8 +114,8 @@ module.exports = [
|
|
|
113
114
|
model: '404062',
|
|
114
115
|
vendor: 'Müller Licht',
|
|
115
116
|
description: 'Kea RGB+CCT',
|
|
116
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
117
|
-
|
|
117
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(
|
|
118
|
+
{colorTempRange: [153, 500], toZigbee: [tz.tint_scene, tuya.tz.do_not_disturb, tuya.tz.color_power_on_behavior]}),
|
|
118
119
|
},
|
|
119
120
|
{
|
|
120
121
|
fingerprint: [{manufacturerName: '_TZ3000_bdbb0fon'}],
|
package/devices/ozsmartthings.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const tuya = require('../lib/tuya');
|
|
2
2
|
|
|
3
3
|
module.exports = [
|
|
4
4
|
{
|
|
@@ -6,6 +6,6 @@ module.exports = [
|
|
|
6
6
|
model: 'DL41-03-10-R-ZB',
|
|
7
7
|
vendor: 'Oz Smart Things',
|
|
8
8
|
description: 'Oz Smart RGBW Zigbee downlight 10w',
|
|
9
|
-
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
9
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
10
10
|
},
|
|
11
11
|
];
|
package/devices/skydance.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
|
-
const
|
|
4
|
+
const tuya = require('../lib/tuya');
|
|
5
5
|
const reporting = require('../lib/reporting');
|
|
6
6
|
const ea = exposes.access;
|
|
7
7
|
|
|
@@ -56,8 +56,7 @@ module.exports = [
|
|
|
56
56
|
model: 'WZ5_rgb_1',
|
|
57
57
|
vendor: 'TuYa',
|
|
58
58
|
description: 'Zigbee & RF 5 in 1 LED controller (RGB mode)',
|
|
59
|
-
extend: extend.light_onoff_brightness_color({supportsHS: true, preferHS: true, disableEffect: true}),
|
|
60
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
59
|
+
extend: tuya.extend.light_onoff_brightness_color({supportsHS: true, preferHS: true, disableEffect: true}),
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
fingerprint: [
|
|
@@ -101,9 +100,9 @@ module.exports = [
|
|
|
101
100
|
model: 'WZ1',
|
|
102
101
|
vendor: 'Skydance',
|
|
103
102
|
description: 'Zigbee & RF 2 channel LED controller',
|
|
104
|
-
extend: extend.light_onoff_brightness({noConfigure: true
|
|
103
|
+
extend: tuya.extend.light_onoff_brightness({noConfigure: true}),
|
|
105
104
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
106
|
-
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
105
|
+
await tuya.extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
107
106
|
const endpoint = device.getEndpoint(1);
|
|
108
107
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
109
108
|
await reporting.onOff(endpoint);
|
package/devices/tuya.js
CHANGED
|
@@ -845,13 +845,13 @@ module.exports = [
|
|
|
845
845
|
e.pm25().withValueMin(0).withValueMax(999).withValueStep(1)],
|
|
846
846
|
},
|
|
847
847
|
{
|
|
848
|
-
fingerprint:
|
|
848
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ogkdpgy2', '_TZE200_3ejwxpmu']),
|
|
849
849
|
model: 'TS0601_co2_sensor',
|
|
850
850
|
vendor: 'TuYa',
|
|
851
851
|
description: 'NDIR co2 sensor',
|
|
852
852
|
fromZigbee: [fz.tuya_air_quality],
|
|
853
853
|
toZigbee: [],
|
|
854
|
-
exposes: [e.co2()],
|
|
854
|
+
exposes: [e.temperature(), e.humidity(), e.co2()],
|
|
855
855
|
},
|
|
856
856
|
{
|
|
857
857
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_7bztmfm1'}],
|
|
@@ -988,7 +988,7 @@ module.exports = [
|
|
|
988
988
|
model: 'CK-BL702-AL-01',
|
|
989
989
|
vendor: 'TuYa',
|
|
990
990
|
description: 'Zigbee LED bulb',
|
|
991
|
-
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [142, 500]}),
|
|
991
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [142, 500]}),
|
|
992
992
|
},
|
|
993
993
|
{
|
|
994
994
|
zigbeeModel: ['TS0505B'],
|
|
@@ -1002,9 +1002,7 @@ module.exports = [
|
|
|
1002
1002
|
{vendor: 'Zemismart', model: 'LXZB-ZB-09A', description: 'Zemismart LED Surface Mounted Downlight 9W RGBW'},
|
|
1003
1003
|
{vendor: 'Feconn', model: 'FE-GU10-5W', description: 'Zigbee GU10 5W smart bulb'},
|
|
1004
1004
|
],
|
|
1005
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
1006
|
-
{colorTempRange: [153, 500], disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
1007
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
1005
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1008
1006
|
},
|
|
1009
1007
|
{
|
|
1010
1008
|
zigbeeModel: ['TS0503B'],
|
|
@@ -1012,19 +1010,17 @@ module.exports = [
|
|
|
1012
1010
|
vendor: 'TuYa',
|
|
1013
1011
|
description: 'Zigbee RGB light',
|
|
1014
1012
|
whiteLabel: [{vendor: 'BTF-Lighting', model: 'C03Z'}],
|
|
1015
|
-
extend: extend.light_onoff_brightness_color(
|
|
1016
|
-
// Requires red fix: https://github.com/Koenkk/zigbee2mqtt/issues/5962#issue-796462106
|
|
1017
|
-
meta: {applyRedFix: true, enhancedHue: false},
|
|
1013
|
+
extend: tuya.extend.light_onoff_brightness_color(),
|
|
1018
1014
|
},
|
|
1019
1015
|
{
|
|
1020
1016
|
zigbeeModel: ['TS0504B'],
|
|
1021
1017
|
model: 'TS0504B',
|
|
1022
1018
|
vendor: 'TuYa',
|
|
1023
1019
|
description: 'Zigbee RGBW light',
|
|
1024
|
-
extend: extend.light_onoff_brightness_color(
|
|
1020
|
+
extend: tuya.extend.light_onoff_brightness_color(),
|
|
1025
1021
|
exposes: [e.light_brightness_color({disablePowerOnBehavior: true})
|
|
1026
1022
|
.setAccess('color_xy', ea.STATE_SET).setAccess('color_hs', ea.STATE_SET)],
|
|
1027
|
-
toZigbee: utils.replaceInArray(extend.light_onoff_brightness_color().toZigbee, [tz.light_color], [tzLocal.TS0504B_color]),
|
|
1023
|
+
toZigbee: utils.replaceInArray(tuya.extend.light_onoff_brightness_color().toZigbee, [tz.light_color], [tzLocal.TS0504B_color]),
|
|
1028
1024
|
meta: {applyRedFix: true},
|
|
1029
1025
|
},
|
|
1030
1026
|
{
|
|
@@ -1032,14 +1028,14 @@ module.exports = [
|
|
|
1032
1028
|
model: 'TS0501A',
|
|
1033
1029
|
description: 'Zigbee light',
|
|
1034
1030
|
vendor: 'TuYa',
|
|
1035
|
-
extend: extend.light_onoff_brightness(
|
|
1031
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
1036
1032
|
},
|
|
1037
1033
|
{
|
|
1038
1034
|
zigbeeModel: ['TS0501B'],
|
|
1039
1035
|
model: 'TS0501B',
|
|
1040
1036
|
description: 'Zigbee light',
|
|
1041
1037
|
vendor: 'TuYa',
|
|
1042
|
-
extend: extend.light_onoff_brightness(
|
|
1038
|
+
extend: tuya.extend.light_onoff_brightness(),
|
|
1043
1039
|
},
|
|
1044
1040
|
{
|
|
1045
1041
|
fingerprint: tuya.fingerprint('TS0202', ['_TYZB01_vwqnz1sn']),
|
|
@@ -1630,8 +1626,7 @@ module.exports = [
|
|
|
1630
1626
|
model: 'TS0503A',
|
|
1631
1627
|
vendor: 'TuYa',
|
|
1632
1628
|
description: 'Led strip controller',
|
|
1633
|
-
extend: extend.light_onoff_brightness_color(
|
|
1634
|
-
meta: {applyRedFix: true},
|
|
1629
|
+
extend: tuya.extend.light_onoff_brightness_color(),
|
|
1635
1630
|
},
|
|
1636
1631
|
{
|
|
1637
1632
|
zigbeeModel: ['TS0503A'],
|
|
@@ -1647,7 +1642,7 @@ module.exports = [
|
|
|
1647
1642
|
model: 'TS0502A',
|
|
1648
1643
|
vendor: 'TuYa',
|
|
1649
1644
|
description: 'Light controller',
|
|
1650
|
-
extend: extend.light_onoff_brightness_colortemp(
|
|
1645
|
+
extend: tuya.extend.light_onoff_brightness_colortemp(),
|
|
1651
1646
|
},
|
|
1652
1647
|
{
|
|
1653
1648
|
zigbeeModel: ['TS0502B'],
|
|
@@ -1658,14 +1653,14 @@ module.exports = [
|
|
|
1658
1653
|
{vendor: 'Mercator Ikuü', model: 'SMI7040', description: 'Ford Batten Light'},
|
|
1659
1654
|
{vendor: 'Mercator Ikuü', model: 'SMD9300', description: 'Donovan Panel Light'},
|
|
1660
1655
|
],
|
|
1661
|
-
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]
|
|
1656
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
|
|
1662
1657
|
},
|
|
1663
1658
|
{
|
|
1664
1659
|
zigbeeModel: ['TS0504A'],
|
|
1665
1660
|
model: 'TS0504A',
|
|
1666
1661
|
vendor: 'TuYa',
|
|
1667
1662
|
description: 'RGBW LED controller',
|
|
1668
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
1663
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
1669
1664
|
},
|
|
1670
1665
|
{
|
|
1671
1666
|
fingerprint: [{modelID: 'TS0505A', manufacturerName: '_TZ3000_sosdczdl'}],
|
|
@@ -1681,7 +1676,7 @@ module.exports = [
|
|
|
1681
1676
|
model: 'TS0505A',
|
|
1682
1677
|
vendor: 'TuYa',
|
|
1683
1678
|
description: 'RGB+CCT light controller',
|
|
1684
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
1679
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
1685
1680
|
},
|
|
1686
1681
|
{
|
|
1687
1682
|
fingerprint: [{manufacturerName: '_TZ2000_a476raq2'}],
|
|
@@ -2806,10 +2801,7 @@ module.exports = [
|
|
|
2806
2801
|
model: 'TS1101_dimmer_module_1ch',
|
|
2807
2802
|
vendor: 'TuYa',
|
|
2808
2803
|
description: 'Zigbee dimmer module 1 channel',
|
|
2809
|
-
|
|
2810
|
-
toZigbee: extend.light_onoff_brightness().toZigbee.concat([tz.tuya_min_brightness]),
|
|
2811
|
-
exposes: [e.light_brightness().withMinBrightness()],
|
|
2812
|
-
extend: extend.light_onoff_brightness(),
|
|
2804
|
+
extend: tuya.extend.light_onoff_brightness({minBrightness: true}),
|
|
2813
2805
|
},
|
|
2814
2806
|
{
|
|
2815
2807
|
fingerprint: [{modelID: 'TS1101', manufacturerName: '_TZ3000_7ysdnebc'}],
|
|
@@ -2817,17 +2809,14 @@ module.exports = [
|
|
|
2817
2809
|
vendor: 'TuYa',
|
|
2818
2810
|
description: 'Zigbee dimmer module 2 channel',
|
|
2819
2811
|
whiteLabel: [{vendor: 'OXT', model: 'SWTZ25'}],
|
|
2820
|
-
|
|
2821
|
-
toZigbee: extend.light_onoff_brightness().toZigbee.concat([tz.tuya_min_brightness]),
|
|
2822
|
-
exposes: [e.light_brightness().withMinBrightness().withEndpoint('l1'),
|
|
2823
|
-
e.light_brightness().withMinBrightness().withEndpoint('l2')],
|
|
2812
|
+
extend: tuya.extend.light_onoff_brightness({minBrightness: true, endpoints: ['l1', 'l2'], noConfigure: true}),
|
|
2824
2813
|
endpoint: (device) => {
|
|
2825
2814
|
return {'l1': 1, 'l2': 2};
|
|
2826
2815
|
},
|
|
2827
2816
|
meta: {multiEndpoint: true},
|
|
2828
2817
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2829
2818
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
2830
|
-
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
2819
|
+
await tuya.extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
2831
2820
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
2832
2821
|
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
2833
2822
|
},
|
|
@@ -2895,7 +2884,7 @@ module.exports = [
|
|
|
2895
2884
|
model: 'TS0011',
|
|
2896
2885
|
vendor: 'TuYa',
|
|
2897
2886
|
description: 'Smart light switch - 1 gang',
|
|
2898
|
-
extend: tuya.extend.switch(),
|
|
2887
|
+
extend: tuya.extend.switch({backlightModeOffNormalInverted: true}),
|
|
2899
2888
|
whiteLabel: [
|
|
2900
2889
|
{vendor: 'Vrey', model: 'VR-X712U-0013'},
|
|
2901
2890
|
{vendor: 'TUYATEC', model: 'GDKES-01TZXD'},
|
package/devices/urlighting.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const tuya = require('../lib/tuya');
|
|
2
2
|
|
|
3
3
|
module.exports = [
|
|
4
4
|
{
|
|
@@ -7,6 +7,6 @@ module.exports = [
|
|
|
7
7
|
vendor: 'UR Lighting',
|
|
8
8
|
description: '10W RGB+CCT downlight',
|
|
9
9
|
meta: {applyRedFix: true, enhancedHue: false},
|
|
10
|
-
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
10
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
11
11
|
},
|
|
12
12
|
];
|
package/devices/woox.js
CHANGED
|
@@ -3,7 +3,6 @@ const reporting = require('../lib/reporting');
|
|
|
3
3
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
4
4
|
const tz = require('../converters/toZigbee');
|
|
5
5
|
const tuya = require('../lib/tuya');
|
|
6
|
-
const extend = require('../lib/extend');
|
|
7
6
|
const e = exposes.presets;
|
|
8
7
|
const ea = exposes.access;
|
|
9
8
|
|
|
@@ -114,7 +113,7 @@ module.exports = [
|
|
|
114
113
|
model: 'R9077',
|
|
115
114
|
vendor: 'Woox',
|
|
116
115
|
description: 'RGB+CCT LED',
|
|
117
|
-
extend: extend.light_onoff_brightness_colortemp_color(
|
|
116
|
+
extend: tuya.extend.light_onoff_brightness_colortemp_color(),
|
|
118
117
|
meta: {applyRedFix: true},
|
|
119
118
|
},
|
|
120
119
|
{
|
package/devices/xiaomi.js
CHANGED
|
@@ -3067,7 +3067,6 @@ module.exports = [
|
|
|
3067
3067
|
exposes: [
|
|
3068
3068
|
e.battery(),
|
|
3069
3069
|
e.battery_voltage(),
|
|
3070
|
-
e.device_temperature(),
|
|
3071
3070
|
e.power_outage_count(false),
|
|
3072
3071
|
exposes
|
|
3073
3072
|
.enum('operation_mode', ea.SET, ['action_mode', 'scene_mode'])
|
|
@@ -3094,4 +3093,38 @@ module.exports = [
|
|
|
3094
3093
|
await endpoint.read('aqaraOpple', [0x148], {manufacturerCode: 0x115f, disableDefaultResponse: true, disableResponse: true});
|
|
3095
3094
|
},
|
|
3096
3095
|
},
|
|
3096
|
+
{
|
|
3097
|
+
zigbeeModel: ['lumi.switch.acn040'],
|
|
3098
|
+
model: 'ZNQBKG31LM',
|
|
3099
|
+
vendor: 'Xiaomi',
|
|
3100
|
+
description: 'Aqara E1 3 gang switch (with neutral)',
|
|
3101
|
+
fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
3102
|
+
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory, tz.aqara_switch_mode_switch,
|
|
3103
|
+
tz.xiaomi_flip_indicator_light],
|
|
3104
|
+
endpoint: (device) => {
|
|
3105
|
+
return {'left': 1, 'center': 2, 'right': 3};
|
|
3106
|
+
},
|
|
3107
|
+
meta: {multiEndpoint: true},
|
|
3108
|
+
exposes: [
|
|
3109
|
+
e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right'),
|
|
3110
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
3111
|
+
.withDescription('Decoupled mode for left button')
|
|
3112
|
+
.withEndpoint('left'),
|
|
3113
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
3114
|
+
.withDescription('Decoupled mode for center button')
|
|
3115
|
+
.withEndpoint('center'),
|
|
3116
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
3117
|
+
.withDescription('Decoupled mode for right button')
|
|
3118
|
+
.withEndpoint('right'),
|
|
3119
|
+
e.action(['single_left', 'double_left', 'single_center', 'double_center', 'single_right', 'double_right',
|
|
3120
|
+
'single_left_center', 'double_left_center', 'single_left_right', 'double_left_right',
|
|
3121
|
+
'single_center_right', 'double_center_right', 'single_all', 'double_all']),
|
|
3122
|
+
e.power_outage_memory(), e.device_temperature(), e.flip_indicator_light(),
|
|
3123
|
+
],
|
|
3124
|
+
onEvent: preventReset,
|
|
3125
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3126
|
+
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
3127
|
+
},
|
|
3128
|
+
ota: ota.zigbeeOTA,
|
|
3129
|
+
},
|
|
3097
3130
|
];
|
package/lib/extend.js
CHANGED
|
@@ -18,10 +18,13 @@ const extend = {
|
|
|
18
18
|
return {exposes, fromZigbee, toZigbee};
|
|
19
19
|
},
|
|
20
20
|
light_onoff_brightness: (options={}) => {
|
|
21
|
-
options = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
options = {
|
|
22
|
+
disableEffect: false, disablePowerOnBehavior: false, disableMoveStep: false, disableTransition: false,
|
|
23
|
+
toZigbee: [], fromZigbee: [], exposes: [], ...options,
|
|
24
|
+
};
|
|
25
|
+
const exposes = [e.light_brightness(), ...(!options.disableEffect ? [e.effect()] : []), ...options.exposes];
|
|
26
|
+
const fromZigbee = [fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report, ...options.fromZigbee];
|
|
27
|
+
const toZigbee = [tz.light_onoff_brightness, tz.ignore_rate, tz.level_config, ...options.toZigbee,
|
|
25
28
|
...(!options.disableTransition ? [tz.ignore_transition] : []),
|
|
26
29
|
...(!options.disableEffect ? [tz.effect] : []),
|
|
27
30
|
...(!options.disableMoveStep ? [tz.light_brightness_move, tz.light_brightness_step] : [])];
|
|
@@ -42,12 +45,17 @@ const extend = {
|
|
|
42
45
|
return result;
|
|
43
46
|
},
|
|
44
47
|
light_onoff_brightness_colortemp: (options={}) => {
|
|
45
|
-
options = {
|
|
46
|
-
|
|
48
|
+
options = {
|
|
49
|
+
disableEffect: false, disableColorTempStartup: false, disablePowerOnBehavior: false,
|
|
50
|
+
toZigbee: [], fromZigbee: [], exposes: [], ...options,
|
|
51
|
+
};
|
|
52
|
+
const exposes = [e.light_brightness_colortemp(options.colorTempRange), ...(!options.disableEffect ? [e.effect()] : []),
|
|
53
|
+
...options.exposes];
|
|
47
54
|
const toZigbee = [tz.light_onoff_brightness, tz.light_colortemp, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
48
55
|
tz.light_colortemp_move, tz.light_brightness_step, tz.light_colortemp_step, tz.light_colortemp_startup, tz.level_config,
|
|
56
|
+
...options.toZigbee,
|
|
49
57
|
tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
50
|
-
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
58
|
+
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report, ...options.fromZigbee];
|
|
51
59
|
|
|
52
60
|
if (options.disableColorTempStartup) {
|
|
53
61
|
exposes[0].removeFeature('color_temp_startup');
|
|
@@ -70,12 +78,15 @@ const extend = {
|
|
|
70
78
|
return result;
|
|
71
79
|
},
|
|
72
80
|
light_onoff_brightness_color: (options={}) => {
|
|
73
|
-
options = {
|
|
81
|
+
options = {
|
|
82
|
+
disableEffect: false, supportsHS: false, preferHS: false, disablePowerOnBehavior: false,
|
|
83
|
+
toZigbee: [], fromZigbee: [], exposes: [], ...options,
|
|
84
|
+
};
|
|
74
85
|
const exposes = [(options.supportsHS ? e.light_brightness_color(options.preferHS) : e.light_brightness_colorxy()),
|
|
75
|
-
...(!options.disableEffect ? [e.effect()] : [])];
|
|
76
|
-
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
86
|
+
...(!options.disableEffect ? [e.effect()] : []), ...options.exposes];
|
|
87
|
+
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report, ...options.fromZigbee];
|
|
77
88
|
const toZigbee = [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
78
|
-
tz.light_brightness_step, tz.level_config, tz.light_hue_saturation_move,
|
|
89
|
+
tz.light_brightness_step, tz.level_config, tz.light_hue_saturation_move, ...options.toZigbee,
|
|
79
90
|
tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
80
91
|
|
|
81
92
|
if (!options.disablePowerOnBehavior) {
|
|
@@ -95,20 +106,20 @@ const extend = {
|
|
|
95
106
|
},
|
|
96
107
|
light_onoff_brightness_colortemp_color: (options={}) => {
|
|
97
108
|
options = {
|
|
98
|
-
disableEffect: false,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
109
|
+
disableEffect: false, supportsHS: false, disableColorTempStartup: false, preferHS: false, disablePowerOnBehavior: false,
|
|
110
|
+
toZigbee: [], fromZigbee: [], exposes: [], ...options,
|
|
111
|
+
};
|
|
112
|
+
const exposes = [
|
|
113
|
+
(options.supportsHS ? e.light_brightness_colortemp_color(options.colorTempRange, options.preferHS) :
|
|
114
|
+
e.light_brightness_colortemp_colorxy(options.colorTempRange)), ...(!options.disableEffect ? [e.effect()] : []),
|
|
115
|
+
...options.exposes,
|
|
116
|
+
];
|
|
117
|
+
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report, ...options.fromZigbee];
|
|
107
118
|
const toZigbee = [
|
|
108
119
|
tz.light_onoff_brightness, tz.light_color_colortemp, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
109
120
|
tz.light_colortemp_move, tz.light_brightness_step, tz.light_colortemp_step, tz.light_hue_saturation_move,
|
|
110
121
|
tz.light_hue_saturation_step, tz.light_colortemp_startup, tz.level_config, tz.light_color_options,
|
|
111
|
-
tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
122
|
+
tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : []), ...options.toZigbee];
|
|
112
123
|
|
|
113
124
|
if (options.disableColorTempStartup) {
|
|
114
125
|
exposes[0].removeFeature('color_temp_startup');
|
package/lib/tuya.js
CHANGED
|
@@ -1168,6 +1168,10 @@ const tuyaExposes = {
|
|
|
1168
1168
|
powerOutageMemory: () => exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
1169
1169
|
.withDescription('Recover state after power outage'),
|
|
1170
1170
|
batteryState: () => exposes.enum('battery_state', ea.STATE, ['low', 'medium', 'high']).withDescription('State of the battery'),
|
|
1171
|
+
doNotDisturb: () => exposes.binary('do_not_disturb', ea.STATE_SET, true, false)
|
|
1172
|
+
.withDescription('Do not disturb mode, when enabled this function will keep the light OFF after a power outage'),
|
|
1173
|
+
colorPowerOnBehavior: () => exposes.enum('color_power_on_behavior', ea.STATE_SET, ['initial', 'previous', 'cutomized'])
|
|
1174
|
+
.withDescription('Power on behavior state'),
|
|
1171
1175
|
};
|
|
1172
1176
|
|
|
1173
1177
|
const skip = {
|
|
@@ -1576,6 +1580,30 @@ const tuyaTz = {
|
|
|
1576
1580
|
await entity.write('genOnOff', {0x8000: {value: value === 'LOCK', type: 0x10}});
|
|
1577
1581
|
},
|
|
1578
1582
|
},
|
|
1583
|
+
min_brightness: {
|
|
1584
|
+
key: ['min_brightness'],
|
|
1585
|
+
convertSet: async (entity, key, value, meta) => {
|
|
1586
|
+
const minValueHex = value.toString(16);
|
|
1587
|
+
const maxValueHex = 'ff';
|
|
1588
|
+
const minMaxValue = parseInt(`${minValueHex}${maxValueHex}`, 16);
|
|
1589
|
+
const payload = {0xfc00: {value: minMaxValue, type: 0x21}};
|
|
1590
|
+
await entity.write('genLevelCtrl', payload, {disableDefaultResponse: true});
|
|
1591
|
+
return {state: {min_brightness: value}};
|
|
1592
|
+
},
|
|
1593
|
+
convertGet: async (entity, key, meta) => {
|
|
1594
|
+
await entity.read('genLevelCtrl', [0xfc00]);
|
|
1595
|
+
},
|
|
1596
|
+
},
|
|
1597
|
+
color_power_on_behavior: {
|
|
1598
|
+
key: ['color_power_on_behavior'],
|
|
1599
|
+
convertSet: async (entity, key, value, meta) => {
|
|
1600
|
+
const lookup = {'initial': 0, 'previous': 1, 'cutomized': 2};
|
|
1601
|
+
utils.validateValue(value, Object.keys(lookup));
|
|
1602
|
+
await entity.command('lightingColorCtrl', 'tuyaOnStartUp', {
|
|
1603
|
+
mode: lookup[value]*256, data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]});
|
|
1604
|
+
return {state: {color_power_on_behavior: value}};
|
|
1605
|
+
},
|
|
1606
|
+
},
|
|
1579
1607
|
datapoints: {
|
|
1580
1608
|
key: [
|
|
1581
1609
|
'temperature_unit', 'temperature_calibration', 'humidity_calibration', 'alarm_switch',
|
|
@@ -1623,6 +1651,13 @@ const tuyaTz = {
|
|
|
1623
1651
|
return {state};
|
|
1624
1652
|
},
|
|
1625
1653
|
},
|
|
1654
|
+
do_not_disturb: {
|
|
1655
|
+
key: ['do_not_disturb'],
|
|
1656
|
+
convertSet: async (entity, key, value, meta) => {
|
|
1657
|
+
await entity.command('lightingColorCtrl', 'tuyaDoNotDisturb', {enable: value ? 1 : 0});
|
|
1658
|
+
return {state: {do_not_disturb: value}};
|
|
1659
|
+
},
|
|
1660
|
+
},
|
|
1626
1661
|
};
|
|
1627
1662
|
|
|
1628
1663
|
const tuyaFz = {
|
|
@@ -1715,6 +1750,17 @@ const tuyaFz = {
|
|
|
1715
1750
|
}
|
|
1716
1751
|
},
|
|
1717
1752
|
},
|
|
1753
|
+
min_brightness: {
|
|
1754
|
+
cluster: 'genLevelCtrl',
|
|
1755
|
+
type: ['attributeReport', 'readResponse'],
|
|
1756
|
+
convert: (model, msg, publish, options, meta) => {
|
|
1757
|
+
if (msg.data.hasOwnProperty(0xfc00)) {
|
|
1758
|
+
const property = utils.postfixWithEndpointName('min_brightness', msg, model, meta);
|
|
1759
|
+
const value = parseInt(msg.data[0xfc00].toString(16).slice(0, 2), 16);
|
|
1760
|
+
return {[property]: value};
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
},
|
|
1718
1764
|
datapoints: {
|
|
1719
1765
|
cluster: 'manuSpecificTuya',
|
|
1720
1766
|
type: ['commandDataResponse', 'commandDataReport', 'commandActiveStatusReport', 'commandActiveStatusReportAlt'],
|
|
@@ -1810,6 +1856,50 @@ const tuyaExtend = {
|
|
|
1810
1856
|
}
|
|
1811
1857
|
return {exposes, fromZigbee, toZigbee};
|
|
1812
1858
|
},
|
|
1859
|
+
light_onoff_brightness_colortemp_color: (options={}) => {
|
|
1860
|
+
const extend = require('./extend');
|
|
1861
|
+
options = {
|
|
1862
|
+
disableColorTempStartup: true, disablePowerOnBehavior: true, toZigbee: [tuyaTz.do_not_disturb, tuyaTz.color_power_on_behavior],
|
|
1863
|
+
exposes: [tuyaExposes.doNotDisturb(), tuyaExposes.colorPowerOnBehavior()], ...options,
|
|
1864
|
+
};
|
|
1865
|
+
const meta = {applyRedFix: true, enhancedHue: false};
|
|
1866
|
+
return {...extend.light_onoff_brightness_colortemp_color(options), meta};
|
|
1867
|
+
},
|
|
1868
|
+
light_onoff_brightness_colortemp: (options={}) => {
|
|
1869
|
+
const extend = require('./extend');
|
|
1870
|
+
options = {
|
|
1871
|
+
disableColorTempStartup: true, disablePowerOnBehavior: true, toZigbee: [tuyaTz.do_not_disturb],
|
|
1872
|
+
exposes: [tuyaExposes.doNotDisturb()], ...options,
|
|
1873
|
+
};
|
|
1874
|
+
return extend.light_onoff_brightness_colortemp(options);
|
|
1875
|
+
},
|
|
1876
|
+
light_onoff_brightness_color: (options={}) => {
|
|
1877
|
+
const extend = require('./extend');
|
|
1878
|
+
options = {
|
|
1879
|
+
disablePowerOnBehavior: true, toZigbee: [tuyaTz.do_not_disturb, tuyaTz.color_power_on_behavior],
|
|
1880
|
+
exposes: [tuyaExposes.doNotDisturb(), tuyaExposes.colorPowerOnBehavior()], ...options,
|
|
1881
|
+
};
|
|
1882
|
+
const meta = {applyRedFix: true, enhancedHue: false};
|
|
1883
|
+
return {...extend.light_onoff_brightness_color(options), meta};
|
|
1884
|
+
},
|
|
1885
|
+
light_onoff_brightness: (options={}) => {
|
|
1886
|
+
const extend = require('./extend');
|
|
1887
|
+
options = {
|
|
1888
|
+
disablePowerOnBehavior: true, toZigbee: [tuyaTz.do_not_disturb], exposes: [tuyaExposes.doNotDisturb()],
|
|
1889
|
+
minBrightness: false, ...options,
|
|
1890
|
+
};
|
|
1891
|
+
const result = extend.light_onoff_brightness(options);
|
|
1892
|
+
result.exposes = options.endpoints ? options.endpoints.map((ee) => e.light_brightness()) : [e.light_brightness()];
|
|
1893
|
+
if (options.minBrightness) {
|
|
1894
|
+
result.fromZigbee.push(tuyaFz.min_brightness);
|
|
1895
|
+
result.toZigbee.push(tuyaTz.min_brightness);
|
|
1896
|
+
result.exposes = result.exposes.map((e) => e.withMinBrightness());
|
|
1897
|
+
}
|
|
1898
|
+
if (options.endpoints) {
|
|
1899
|
+
result.exposes = result.exposes.map((e, i) => e.withEndpoint(options.endpoints[i]));
|
|
1900
|
+
}
|
|
1901
|
+
return result;
|
|
1902
|
+
},
|
|
1813
1903
|
};
|
|
1814
1904
|
|
|
1815
1905
|
module.exports = {
|
package/lib/xiaomi.js
CHANGED
|
@@ -163,7 +163,7 @@ const numericAttributes2Payload = async (msg, meta, model, options, dataObject)
|
|
|
163
163
|
}
|
|
164
164
|
break;
|
|
165
165
|
case '3':
|
|
166
|
-
if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM', 'MCCGQ14LM', 'GZCGQ01LM', 'JY-GZ-01AQ'].includes(model.model)) {
|
|
166
|
+
if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM', 'MCCGQ14LM', 'GZCGQ01LM', 'JY-GZ-01AQ', 'CTP-R01'].includes(model.model)) {
|
|
167
167
|
// The temperature value is constant 25 °C and does not change, so we ignore it
|
|
168
168
|
// https://github.com/Koenkk/zigbee2mqtt/issues/11126
|
|
169
169
|
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/3585
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.43",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"axios": "^1.3.
|
|
37
|
+
"axios": "^1.3.2",
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
39
|
"https-proxy-agent": "^5.0.1",
|
|
40
40
|
"tar-stream": "^3.0.0",
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
41
|
+
"zigbee-herdsman": "^0.14.90"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|