zigbee-herdsman-converters 14.0.427 → 14.0.428

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.
@@ -5527,15 +5527,16 @@ const converters = {
5527
5527
  const actionLookup = !isLegacyEnabled(options) && ['QBKG03LM', 'QBKG22LM', 'QBKG04LM', 'QBKG21LM'].includes(model.model) ?
5528
5528
  {0: 'hold', 1: 'release', 2: 'double'} : {0: 'single', 1: 'single'};
5529
5529
 
5530
- // Dont' use postfixWithEndpointName here, endpoints don't match
5531
- if (mapping) {
5532
- if (mapping[msg.endpoint.ID]) {
5533
- const button = mapping[msg.endpoint.ID];
5534
- return {action: `${actionLookup[msg.data['onOff']]}_${button}`};
5535
- }
5536
- } else {
5537
- return {action: actionLookup[msg.data['onOff']]};
5530
+ const action = actionLookup[msg.data['onOff']];
5531
+ const button = mapping && mapping[msg.endpoint.ID] ? `_${button}` : '';
5532
+
5533
+ if (action === 'release') {
5534
+ const anotherAction = globalStore.getValue(msg.endpoint, 'hold', false) ? 'hold_release' : 'single';
5535
+ publish({action: `${anotherAction}${button}`});
5538
5536
  }
5537
+ globalStore.putValue(msg.endpoint, 'hold', action === 'hold');
5538
+
5539
+ return {action: `${action}${button}`};
5539
5540
  },
5540
5541
  },
5541
5542
  xiaomi_multistate_action: {
package/devices/lidl.js CHANGED
@@ -508,7 +508,8 @@ module.exports = [
508
508
  },
509
509
  },
510
510
  {
511
- fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_th6zqqy6'}],
511
+ fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_th6zqqy6'},
512
+ {modelID: 'TS0505B', manufacturerName: '_TZ3000_wr6g6olr'}],
512
513
  model: 'HG07834B',
513
514
  vendor: 'Lidl',
514
515
  description: 'Livarno Lux E14 candle RGB',
package/devices/xiaomi.js CHANGED
@@ -432,7 +432,7 @@ module.exports = [
432
432
  fromZigbee: [fz.xiaomi_on_off_ignore_endpoint_4_5_6, fz.xiaomi_on_off_action, fz.legacy.QBKG04LM_QBKG11LM_click,
433
433
  fz.xiaomi_operation_mode_basic],
434
434
  exposes: [
435
- e.switch(), e.action(['release', 'hold', 'double']),
435
+ e.switch(), e.action(['release', 'hold', 'double', 'single', 'hold_release']),
436
436
  exposes.enum('operation_mode', ea.STATE_SET, ['control_relay', 'decoupled'])
437
437
  .withDescription('Decoupled mode'),
438
438
  ],
@@ -480,7 +480,8 @@ module.exports = [
480
480
  e.switch().withEndpoint('left'),
481
481
  e.switch().withEndpoint('right'),
482
482
  e.temperature(),
483
- e.action(['release_left', 'release_right', 'release_both', 'double_left', 'double_right']),
483
+ e.action(['release_left', 'release_right', 'release_both', 'double_left', 'double_right',
484
+ 'single_left', 'single_right', 'hold_release_left', 'hold_release_left']),
484
485
  exposes.enum('operation_mode', ea.STATE_SET, ['control_left_relay', 'control_right_relay', 'decoupled'])
485
486
  .withDescription('Operation mode for left button')
486
487
  .withEndpoint('left'),
@@ -556,8 +557,7 @@ module.exports = [
556
557
  fromZigbee: [fz.xiaomi_on_off_ignore_endpoint_4_5_6, fz.xiaomi_on_off_action, fz.legacy.QBKG04LM_QBKG11LM_click,
557
558
  fz.xiaomi_operation_mode_basic],
558
559
  exposes: [
559
- e.switch(),
560
- e.action(['single', 'hold', 'release']),
560
+ e.switch(), e.action(['release', 'hold', 'double', 'single', 'hold_release']),
561
561
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
562
562
  .withDescription('Decoupled mode'),
563
563
  ],
@@ -582,7 +582,8 @@ module.exports = [
582
582
  exposes: [
583
583
  e.switch().withEndpoint('left'),
584
584
  e.switch().withEndpoint('right'),
585
- e.action(['single_left', 'single_right', 'single_both']),
585
+ e.action(['release_left', 'release_right', 'release_both', 'double_left', 'double_right',
586
+ 'single_left', 'single_right', 'hold_release_left', 'hold_release_left']),
586
587
  exposes.enum('operation_mode', ea.ALL, ['control_left_relay', 'control_right_relay', 'decoupled'])
587
588
  .withDescription('Operation mode for left button')
588
589
  .withEndpoint('left'),
package/lib/exposes.js CHANGED
@@ -503,8 +503,8 @@ module.exports = {
503
503
  presets: {
504
504
  ac_frequency: () => new Numeric('ac_frequency', access.STATE).withUnit('Hz').withDescription('Measured electrical AC frequency'),
505
505
  action: (values) => new Enum('action', access.STATE, values).withDescription('Triggered action (e.g. a button click)'),
506
- angle: (name) => new Numeric(name, access.STATE).withValueMin(-360).withValueMax(360),
507
- angle_axis: (name) => new Numeric(name, access.STATE).withValueMin(-90).withValueMax(90),
506
+ angle: (name) => new Numeric(name, access.STATE).withValueMin(-360).withValueMax(360).withUnit('°'),
507
+ angle_axis: (name) => new Numeric(name, access.STATE).withValueMin(-90).withValueMax(90).withUnit('°'),
508
508
  aqi: () => new Numeric('aqi', access.STATE).withDescription('Air quality index'),
509
509
  auto_lock: () => new Switch().withState('auto_lock', false, 'Enable/disable auto lock', access.STATE_SET, 'AUTO', 'MANUAL'),
510
510
  auto_relock_time: () => new Numeric('auto_relock_time', access.ALL).withValueMin(0).withUnit('s').withDescription('The number of seconds to wait after unlocking a lock before it automatically locks again. 0=disabled'),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.427",
3
+ "version": "14.0.428",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.427",
3
+ "version": "14.0.428",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [