zigbee-herdsman-converters 15.0.49 → 15.0.50

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.
@@ -84,21 +84,21 @@ module.exports = [
84
84
  model: 'GL-H-001',
85
85
  vendor: 'Gledopto',
86
86
  description: 'Zigbee RF Hub',
87
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
87
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
88
88
  },
89
89
  {
90
90
  zigbeeModel: ['HOMA2023'],
91
91
  model: 'GD-CZ-006',
92
92
  vendor: 'Gledopto',
93
93
  description: 'Zigbee LED Controller WW/CW',
94
- extend: gledoptoExtend.light_onoff_brightness(),
94
+ extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
95
95
  },
96
96
  {
97
97
  zigbeeModel: ['GL-SD-001'],
98
98
  model: 'GL-SD-001',
99
99
  vendor: 'Gledopto',
100
100
  description: 'Zigbee triac AC dimmer',
101
- extend: gledoptoExtend.light_onoff_brightness(),
101
+ extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
102
102
  meta: {disableDefaultResponse: true},
103
103
  },
104
104
  {
@@ -112,14 +112,14 @@ module.exports = [
112
112
  model: 'GL-C-006',
113
113
  vendor: 'Gledopto',
114
114
  description: 'Zigbee LED Controller WW/CW',
115
- extend: gledoptoExtend.light_onoff_brightness_colortemp(),
115
+ extend: gledoptoExtend.light_onoff_brightness_colortemp({disablePowerOnBehavior: true}),
116
116
  },
117
117
  {
118
118
  zigbeeModel: ['GL-C-006S'],
119
119
  model: 'GL-C-006S',
120
120
  vendor: 'Gledopto',
121
121
  description: 'Zigbee LED Controller WW/CW (plus)',
122
- extend: gledoptoExtend.light_onoff_brightness_colortemp(),
122
+ extend: gledoptoExtend.light_onoff_brightness_colortemp({disablePowerOnBehavior: true}),
123
123
  },
124
124
  {
125
125
  zigbeeModel: ['GL-C-006P'],
@@ -159,7 +159,7 @@ module.exports = [
159
159
  meta: {disableDefaultResponse: (entity) => !!entity.getDevice().getEndpoint(12)},
160
160
  vendor: 'Gledopto',
161
161
  description: 'Zigbee LED Controller RGBW (1 ID)',
162
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
162
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
163
163
  },
164
164
  {
165
165
  fingerprint: [
@@ -177,7 +177,7 @@ module.exports = [
177
177
  model: 'GL-C-007-2ID', // 2 ID controls white and color separate
178
178
  vendor: 'Gledopto',
179
179
  description: 'Zigbee LED Controller RGBW (2 ID)',
180
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
180
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
181
181
  exposes: [e.light_brightness_colortemp_colorxy().withEndpoint('rgb'), e.light_brightness().withEndpoint('white')],
182
182
  endpoint: (device) => {
183
183
  if (device.getEndpoint(10) && device.getEndpoint(11) && device.getEndpoint(13)) {
@@ -194,7 +194,7 @@ module.exports = [
194
194
  model: 'GL-C-007S',
195
195
  vendor: 'Gledopto',
196
196
  description: 'Zigbee LED Controller RGBW (plus)',
197
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
197
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
198
198
  },
199
199
  {
200
200
  zigbeeModel: ['GL-C-007P'],
@@ -227,7 +227,7 @@ module.exports = [
227
227
  model: 'GL-C-008-2ID', // 2 ID controls color temperature and color separate
228
228
  vendor: 'Gledopto',
229
229
  description: 'Zigbee LED Controller RGB+CCT (2 ID)',
230
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
230
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
231
231
  exposes: [e.light_brightness_colorxy().withEndpoint('rgb'), e.light_brightness_colortemp().withEndpoint('cct')],
232
232
  // Only enable disableDefaultResponse for the second fingerprint:
233
233
  // https://github.com/Koenkk/zigbee-herdsman-converters/issues/1315#issuecomment-645331185
@@ -247,7 +247,7 @@ module.exports = [
247
247
  model: 'GL-C-008-1ID', // 1 ID controls color temperature and color separate
248
248
  vendor: 'Gledopto',
249
249
  description: 'Zigbee LED Controller RGB+CCT (1 ID)',
250
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
250
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
251
251
  meta: {disableDefaultResponse: true},
252
252
  },
253
253
  {
@@ -255,7 +255,7 @@ module.exports = [
255
255
  model: 'GL-C-008S',
256
256
  vendor: 'Gledopto',
257
257
  description: 'Zigbee LED Controller RGB+CCT (plus)',
258
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
258
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
259
259
  meta: {disableDefaultResponse: true},
260
260
  },
261
261
  {
@@ -295,7 +295,7 @@ module.exports = [
295
295
  model: 'GL-C-009',
296
296
  vendor: 'Gledopto',
297
297
  description: 'Zigbee LED Controller W',
298
- extend: gledoptoExtend.light_onoff_brightness(),
298
+ extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
299
299
  },
300
300
  {
301
301
  zigbeeModel: ['GL-C-009P'],
@@ -314,14 +314,14 @@ module.exports = [
314
314
  model: 'GL-C-009S',
315
315
  vendor: 'Gledopto',
316
316
  description: 'Zigbee LED Controller W (plus)',
317
- extend: gledoptoExtend.light_onoff_brightness(),
317
+ extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
318
318
  },
319
319
  {
320
320
  zigbeeModel: ['GL-MC-001'],
321
321
  model: 'GL-MC-001',
322
322
  vendor: 'Gledopto',
323
323
  description: 'Zigbee USB Mini LED Controller RGB+CCT',
324
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
324
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
325
325
  meta: {disableDefaultResponse: true},
326
326
  },
327
327
  {
@@ -352,7 +352,7 @@ module.exports = [
352
352
  model: 'GL-S-003Z',
353
353
  vendor: 'Gledopto',
354
354
  description: 'Zigbee 5W GU10 Bulb RGBW',
355
- extend: gledoptoExtend.light_onoff_brightness_color(),
355
+ extend: gledoptoExtend.light_onoff_brightness_color({disablePowerOnBehavior: true}),
356
356
  endpoint: (device) => {
357
357
  // https://github.com/Koenkk/zigbee2mqtt/issues/5169
358
358
  if (device.getEndpoint(12)) return {default: 12};
@@ -365,21 +365,23 @@ module.exports = [
365
365
  model: 'GL-S-004Z',
366
366
  vendor: 'Gledopto',
367
367
  description: 'Zigbee 4W MR16 Bulb 30deg RGB+CCT',
368
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disableColorTempStartup: false, colorTempRange: [155, 495]}),
368
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({
369
+ disableColorTempStartup: false, colorTempRange: [155, 495], disablePowerOnBehavior: true,
370
+ }),
369
371
  },
370
372
  {
371
373
  zigbeeModel: ['GL-S-005Z'],
372
374
  model: 'GL-S-005Z',
373
375
  vendor: 'Gledopto',
374
376
  description: 'Zigbee 4W MR16 Bulb 120deg RGB+CCT',
375
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
377
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
376
378
  },
377
379
  {
378
380
  zigbeeModel: ['GL-S-004ZS'],
379
381
  model: 'GL-S-004ZS',
380
382
  vendor: 'Gledopto',
381
383
  description: 'Zigbee 4W MR16 Bulb RGB+CCT (plus)',
382
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
384
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
383
385
  },
384
386
  {
385
387
  zigbeeModel: ['GL-S-004P', 'GL-S-005P'],
@@ -394,14 +396,14 @@ module.exports = [
394
396
  model: 'GL-S-007Z',
395
397
  vendor: 'Gledopto',
396
398
  description: 'Zigbee 5W GU10 Bulb RGB+CCT',
397
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
399
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
398
400
  },
399
401
  {
400
402
  zigbeeModel: ['GL-S-007ZS'],
401
403
  model: 'GL-S-007ZS',
402
404
  vendor: 'Gledopto',
403
405
  description: 'Zigbee 4W GU10 Bulb RGB+CCT (plus)',
404
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
406
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
405
407
  },
406
408
  {
407
409
  zigbeeModel: ['GL-S-007P'],
@@ -416,21 +418,21 @@ module.exports = [
416
418
  model: 'GL-S-008Z',
417
419
  vendor: 'Gledopto',
418
420
  description: 'Zigbee 5W PAR16 Bulb RGB+CCT',
419
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
421
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
420
422
  },
421
423
  {
422
424
  zigbeeModel: ['GL-B-001Z'],
423
425
  model: 'GL-B-001Z',
424
426
  vendor: 'Gledopto',
425
427
  description: 'Zigbee 4W E12/E14 Bulb RGB+CCT',
426
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
428
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
427
429
  },
428
430
  {
429
431
  zigbeeModel: ['GL-B-001ZS'],
430
432
  model: 'GL-B-001ZS',
431
433
  vendor: 'Gledopto',
432
434
  description: 'Zigbee 4W E12/E14 Bulb RGB+CCT (plus)',
433
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
435
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
434
436
  },
435
437
  {
436
438
  zigbeeModel: ['GL-B-001P'],
@@ -445,14 +447,14 @@ module.exports = [
445
447
  model: 'GL-B-007Z',
446
448
  vendor: 'Gledopto',
447
449
  description: 'Zigbee 6W E26/E27 Bulb RGB+CCT',
448
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
450
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
449
451
  },
450
452
  {
451
453
  zigbeeModel: ['GL-B-007ZS'],
452
454
  model: 'GL-B-007ZS',
453
455
  vendor: 'Gledopto',
454
456
  description: 'Zigbee 6W E26/E27 Bulb RGB+CCT (plus)',
455
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
457
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
456
458
  },
457
459
  {
458
460
  zigbeeModel: ['GL-B-007P'],
@@ -467,14 +469,14 @@ module.exports = [
467
469
  model: 'GL-B-008Z',
468
470
  vendor: 'Gledopto',
469
471
  description: 'Zigbee 12W E26/E27 Bulb RGB+CCT',
470
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
472
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
471
473
  },
472
474
  {
473
475
  zigbeeModel: ['GL-B-008ZS'],
474
476
  model: 'GL-B-008ZS',
475
477
  vendor: 'Gledopto',
476
478
  description: 'Zigbee 12W E26/E27 Bulb RGB+CCT (plus)',
477
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
479
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
478
480
  },
479
481
  {
480
482
  zigbeeModel: ['GL-B-008P'],
@@ -497,14 +499,14 @@ module.exports = [
497
499
  model: 'GL-D-003Z',
498
500
  vendor: 'Gledopto',
499
501
  description: 'Zigbee 6W Downlight RGB+CCT',
500
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
502
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
501
503
  },
502
504
  {
503
505
  zigbeeModel: ['GL-D-003ZS'],
504
506
  model: 'GL-D-003ZS',
505
507
  vendor: 'Gledopto',
506
508
  description: 'Zigbee 6W Downlight RGB+CCT (plus)',
507
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
509
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
508
510
  },
509
511
  {
510
512
  zigbeeModel: ['GL-D-003P'],
@@ -519,14 +521,14 @@ module.exports = [
519
521
  model: 'GL-D-004Z',
520
522
  vendor: 'Gledopto',
521
523
  description: 'Zigbee 9W Downlight RGB+CCT',
522
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
524
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
523
525
  },
524
526
  {
525
527
  zigbeeModel: ['GL-D-004ZS'],
526
528
  model: 'GL-D-004ZS',
527
529
  vendor: 'Gledopto',
528
530
  description: 'Zigbee 9W Downlight RGB+CCT (plus)',
529
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
531
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
530
532
  },
531
533
  {
532
534
  zigbeeModel: ['GL-D-004P'],
@@ -541,14 +543,14 @@ module.exports = [
541
543
  model: 'GL-D-005Z',
542
544
  vendor: 'Gledopto',
543
545
  description: 'Zigbee 12W Downlight RGB+CCT',
544
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
546
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
545
547
  },
546
548
  {
547
549
  zigbeeModel: ['GL-D-005ZS'],
548
550
  model: 'GL-D-005ZS',
549
551
  vendor: 'Gledopto',
550
552
  description: 'Zigbee 12W Downlight RGB+CCT (plus)',
551
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
553
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
552
554
  },
553
555
  {
554
556
  zigbeeModel: ['GL-D-005P'],
@@ -578,7 +580,7 @@ module.exports = [
578
580
  model: 'GL-FL-004TZ',
579
581
  vendor: 'Gledopto',
580
582
  description: 'Zigbee 10W Floodlight RGB+CCT',
581
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
583
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
582
584
  },
583
585
  {
584
586
  zigbeeModel: ['GL-B-003P'],
@@ -592,7 +594,7 @@ module.exports = [
592
594
  model: 'GL-FL-004TZS',
593
595
  vendor: 'Gledopto',
594
596
  description: 'Zigbee 10W Floodlight RGB+CCT (plus)',
595
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [155, 495]}),
597
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [155, 495], disablePowerOnBehavior: true}),
596
598
  },
597
599
  {
598
600
  zigbeeModel: ['GL-FL-004P', 'GL-FL-004TZP'],
@@ -630,14 +632,14 @@ module.exports = [
630
632
  model: 'GL-FL-005TZ',
631
633
  vendor: 'Gledopto',
632
634
  description: 'Zigbee 30W Floodlight RGB+CCT',
633
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
635
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
634
636
  },
635
637
  {
636
638
  zigbeeModel: ['GL-FL-005TZS'],
637
639
  model: 'GL-FL-005TZS',
638
640
  vendor: 'Gledopto',
639
641
  description: 'Zigbee 30W Floodlight RGB+CCT (plus)',
640
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
642
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
641
643
  },
642
644
  {
643
645
  zigbeeModel: ['GL-FL-005P', 'GL-FL-005TZP'],
@@ -652,14 +654,14 @@ module.exports = [
652
654
  model: 'GL-FL-006TZ',
653
655
  vendor: 'Gledopto',
654
656
  description: 'Zigbee 60W Floodlight RGB+CCT',
655
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
657
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
656
658
  },
657
659
  {
658
660
  zigbeeModel: ['GL-FL-006TZS'],
659
661
  model: 'GL-FL-006TZS',
660
662
  vendor: 'Gledopto',
661
663
  description: 'Zigbee 60W Floodlight RGB+CCT (plus)',
662
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
664
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
663
665
  },
664
666
  {
665
667
  zigbeeModel: ['GL-FL-006P', 'GL-FL-006TZP'],
@@ -674,14 +676,14 @@ module.exports = [
674
676
  model: 'GL-G-001Z',
675
677
  vendor: 'Gledopto',
676
678
  description: 'Zigbee 12W Garden Lamp RGB+CCT',
677
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
679
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
678
680
  },
679
681
  {
680
682
  zigbeeModel: ['GL-G-001ZS'],
681
683
  model: 'GL-G-001ZS',
682
684
  vendor: 'Gledopto',
683
685
  description: 'Zigbee 12W Garden Lamp RGB+CCT (plus)',
684
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
686
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
685
687
  },
686
688
  {
687
689
  zigbeeModel: ['GL-G-001P'],
@@ -712,21 +714,21 @@ module.exports = [
712
714
  model: 'GL-G-007Z',
713
715
  vendor: 'Gledopto',
714
716
  description: 'Zigbee 9W garden lamp RGB+CCT',
715
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
717
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
716
718
  },
717
719
  {
718
720
  zigbeeModel: ['GL-W-001Z'],
719
721
  model: 'GL-W-001Z',
720
722
  vendor: 'Gledopto',
721
723
  description: 'Zigbee on/off wall switch',
722
- extend: gledoptoExtend.switch(),
724
+ extend: gledoptoExtend.switch({disablePowerOnBehavior: true}),
723
725
  },
724
726
  {
725
727
  zigbeeModel: ['GL-SD-002'],
726
728
  model: 'GL-SD-002',
727
729
  vendor: 'Gledopto',
728
730
  description: 'Zigbee 3.0 smart home switch',
729
- extend: gledoptoExtend.switch(),
731
+ extend: gledoptoExtend.switch({disablePowerOnBehavior: true}),
730
732
  },
731
733
  {
732
734
  zigbeeModel: ['GL-B-004P'],
package/devices/konke.js CHANGED
@@ -10,13 +10,16 @@ module.exports = [
10
10
  vendor: 'Konke',
11
11
  description: 'Multi-function button',
12
12
  fromZigbee: [fz.konke_action, fz.battery, fz.legacy.konke_click],
13
- exposes: [e.battery(), e.action(['single', 'double', 'hold'])],
14
13
  toZigbee: [],
14
+ exposes: [e.battery_low(), e.battery(), e.action(['single', 'double', 'hold'])],
15
15
  meta: {battery: {voltageToPercentage: '3V_2500'}},
16
16
  configure: async (device, coordinatorEndpoint, logger) => {
17
17
  const endpoint = device.getEndpoint(1);
18
18
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
19
19
  await reporting.batteryVoltage(endpoint);
20
+ // Has Unknown power source, force it.
21
+ device.powerSource = 'Battery';
22
+ device.save();
20
23
  },
21
24
  },
22
25
  {
@@ -277,7 +277,12 @@ module.exports = [
277
277
  await reporting.onOff(endpoint);
278
278
  await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
279
279
  await reporting.activePower(endpoint);
280
- await reporting.apparentPower(endpoint);
280
+ try {
281
+ await reporting.apparentPower(endpoint);
282
+ } catch (e) {
283
+ // Some version/firmware don't seem to support this.
284
+ // https://github.com/Koenkk/zigbee2mqtt/issues/16732
285
+ }
281
286
  },
282
287
  },
283
288
  {
@@ -15,7 +15,8 @@ module.exports = [
15
15
  {modelId: 'TS0601', manufacturerName: '_TZE200_ps5v5jor'},
16
16
  {modelId: 'TS0601', manufacturerName: '_TZE200_jeaxp72v'},
17
17
  {modelId: 'TS0601', manufacturerName: '_TZE200_owwdxjbx'},
18
- {modelId: 'TS0601', manufacturerName: '_TZE200_2cs6g9i7'}],
18
+ {modelId: 'TS0601', manufacturerName: '_TZE200_2cs6g9i7'},
19
+ {modelId: 'TS0601', manufacturerName: '_TZE200_04yfvweb'}],
19
20
  model: 'GS361A-H04',
20
21
  vendor: 'Siterwell',
21
22
  description: 'Radiator valve with thermostat',
@@ -33,7 +34,8 @@ module.exports = [
33
34
  {vendor: 'Tesla Smart', description: 'Thermostatic Radiator Valve Controller', model: 'TSL-TRV-GS361A'},
34
35
  {vendor: 'Nedis', description: 'Thermostatic Radiator Valve Controller', model: 'ZBHTR10WT'},
35
36
  {vendor: 'TCP Smart', description: 'Smart Thermostatic Radiator Valve', model: 'TBUWTRV'},
36
- {vendor: 'Brennenstuhl', description: 'Radiator Thermostat', model: 'HT CZ 01'}],
37
+ {vendor: 'Brennenstuhl', description: 'Radiator Thermostat', model: 'HT CZ 01'},
38
+ {vendor: 'Appartme', description: 'Głowica termostatyczna', model: 'APRM-04-001'}],
37
39
  exposes: [e.child_lock(), e.window_detection(), e.battery(), e.valve_detection(),
38
40
  e.position().withDescription('TRV valve position in %.'),
39
41
  exposes.climate()
package/devices/tuya.js CHANGED
@@ -1977,7 +1977,8 @@ module.exports = [
1977
1977
  model: 'TS0002',
1978
1978
  vendor: 'TuYa',
1979
1979
  description: '2 gang switch',
1980
- whiteLabel: [{vendor: 'Zemismart', model: 'ZM-CSW002-D_switch'}, {vendor: 'Lonsonho', model: 'X702'}],
1980
+ whiteLabel: [{vendor: 'Zemismart', model: 'ZM-CSW002-D_switch'}, {vendor: 'Lonsonho', model: 'X702'},
1981
+ {vendor: 'Avatto', model: 'ZTS02'}],
1981
1982
  extend: tuya.extend.switch(),
1982
1983
  exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
1983
1984
  endpoint: (device) => {
@@ -3007,7 +3008,7 @@ module.exports = [
3007
3008
  vendor: 'TuYa',
3008
3009
  description: 'Smart light switch - 2 gang',
3009
3010
  whiteLabel: [{vendor: 'Vrey', model: 'VR-X712U-0013'}, {vendor: 'TUYATEC', model: 'GDKES-02TZXD'},
3010
- {vendor: 'Earda', model: 'ESW-2ZAA-EU'}],
3011
+ {vendor: 'Earda', model: 'ESW-2ZAA-EU'}, {vendor: 'Moes', model: 'ZS-US2-WH-MS'}, {vendor: 'Moes', model: 'ZS-US2-BK-MS'}],
3011
3012
  extend: tuya.extend.switch({backlightModeOffNormalInverted: true, endpoints: ['left', 'right']}),
3012
3013
  endpoint: (device) => {
3013
3014
  return {'left': 1, 'right': 2};
@@ -3985,8 +3986,12 @@ module.exports = [
3985
3986
  description: '2 channel dimmer',
3986
3987
  fromZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
3987
3988
  .fromZigbee.concat([tuya.fz.power_on_behavior, fzLocal.TS110E_switch_type, fzLocal.TS110E]),
3988
- toZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
3989
- .toZigbee.concat([tuya.tz.power_on_behavior, tzLocal.TS110E_options]),
3989
+ toZigbee: utils.replaceInArray(
3990
+ extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
3991
+ .toZigbee.concat([tuya.tz.power_on_behavior, tzLocal.TS110E_options]),
3992
+ [tz.light_onoff_brightness],
3993
+ [tzLocal.TS110E_light_onoff_brightness],
3994
+ ),
3990
3995
  meta: {multiEndpoint: true},
3991
3996
  exposes: [
3992
3997
  e.light_brightness().withMinBrightness().withMaxBrightness().withEndpoint('l1'),
@@ -4064,4 +4069,27 @@ module.exports = [
4064
4069
  ],
4065
4070
  },
4066
4071
  },
4072
+ {
4073
+ zigbeeModel: ['TS0049'],
4074
+ model: 'TS0049',
4075
+ vendor: 'TuYa',
4076
+ description: 'Water valve',
4077
+ fromZigbee: [tuya.fz.datapoints],
4078
+ toZigbee: [tuya.tz.datapoints],
4079
+ onEvent: tuya.onEventSetLocalTime,
4080
+ configure: tuya.configureMagicPacket,
4081
+ exposes: [tuya.exposes.errorStatus(), tuya.exposes.switch(), tuya.exposes.batteryState(),
4082
+ tuya.exposes.countdown().withValueMin(0).withValueMax(255).withUnit('minutes')
4083
+ .withDescription('Max on time in minutes'),
4084
+ ],
4085
+ meta: {
4086
+ tuyaSendCommand: 'sendData',
4087
+ tuyaDatapoints: [
4088
+ [26, 'error_status', tuya.valueConverter.raw],
4089
+ [101, 'state', tuya.valueConverter.onOff],
4090
+ [111, 'countdown', tuya.valueConverter.raw],
4091
+ [115, 'battery_state', tuya.valueConverter.batteryState],
4092
+ ],
4093
+ },
4094
+ },
4067
4095
  ];
package/devices/xiaomi.js CHANGED
@@ -3089,6 +3089,8 @@ module.exports = [
3089
3089
  configure: async (device, coordinatorEndpoint, logger) => {
3090
3090
  const endpoint = device.getEndpoint(1);
3091
3091
  await endpoint.read('aqaraOpple', [0xfff1], {manufacturerCode: 0x115f});
3092
+ device.powerSource = 'Mains (single phase)';
3093
+ device.save();
3092
3094
  },
3093
3095
  },
3094
3096
  {
package/lib/tuya.js CHANGED
@@ -1620,8 +1620,8 @@ const tuyaTz = {
1620
1620
  convertSet: async (entity, key, value, meta) => {
1621
1621
  // A set converter is only called once; therefore we need to loop
1622
1622
  const state = {};
1623
- if (!meta.mapped.meta || !meta.mapped.meta.tuyaDatapoints) throw new Error('No datapoints map defined');
1624
- const datapoints = meta.mapped.meta.tuyaDatapoints;
1623
+ const datapoints = utils.getMetaValue(entity, meta.mapped, 'tuyaDatapoints', undefined, undefined);
1624
+ if (!datapoints) throw new Error('No datapoints map defined');
1625
1625
  for (const [key, value] of Object.entries(meta.message)) {
1626
1626
  const convertedKey = meta.mapped.meta.multiEndpoint ? `${key}_${meta.endpoint_name}` : key;
1627
1627
  const dpEntry = datapoints.find((d) => d[1] === convertedKey);
@@ -1631,20 +1631,21 @@ const tuyaTz = {
1631
1631
  if (dpEntry[3] && dpEntry[3].skip && dpEntry[3].skip(meta)) continue;
1632
1632
  const dpId = dpEntry[0];
1633
1633
  const convertedValue = await dpEntry[2].to(value, meta);
1634
+ const sendCommand = utils.getMetaValue(entity, meta.mapped, 'tuyaSendCommand', undefined, 'dataRequest');
1634
1635
  if (convertedValue === undefined) {
1635
1636
  // conversion done inside converter, ignore.
1636
1637
  } else if (typeof convertedValue === 'boolean') {
1637
- await sendDataPointBool(entity, dpId, convertedValue, 'dataRequest', 1);
1638
+ await sendDataPointBool(entity, dpId, convertedValue, sendCommand, 1);
1638
1639
  } else if (typeof convertedValue === 'number') {
1639
- await sendDataPointValue(entity, dpId, convertedValue, 'dataRequest', 1);
1640
+ await sendDataPointValue(entity, dpId, convertedValue, sendCommand, 1);
1640
1641
  } else if (typeof convertedValue === 'string') {
1641
- await sendDataPointStringBuffer(entity, dpId, convertedValue, 'dataRequest', 1);
1642
+ await sendDataPointStringBuffer(entity, dpId, convertedValue, sendCommand, 1);
1642
1643
  } else if (Array.isArray(convertedValue)) {
1643
- await sendDataPointRaw(entity, dpId, convertedValue, 'dataRequest', 1);
1644
+ await sendDataPointRaw(entity, dpId, convertedValue, sendCommand, 1);
1644
1645
  } else if (convertedValue instanceof Enum) {
1645
- await sendDataPointEnum(entity, dpId, convertedValue.valueOf(), 'dataRequest', 1);
1646
+ await sendDataPointEnum(entity, dpId, convertedValue.valueOf(), sendCommand, 1);
1646
1647
  } else if (convertedValue instanceof Bitmap) {
1647
- await sendDataPointBitmap(entity, dpId, convertedValue.valueOf(), 'dataRequest', 1);
1648
+ await sendDataPointBitmap(entity, dpId, convertedValue.valueOf(), sendCommand, 1);
1648
1649
  } else {
1649
1650
  throw new Error(`Don't know how to send type '${typeof convertedValue}'`);
1650
1651
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "15.0.49",
3
+ "version": "15.0.50",
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.2",
37
+ "axios": "^1.3.3",
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.92"
41
+ "zigbee-herdsman": "^0.14.93"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",