zigbee-herdsman-converters 14.0.658 → 14.0.660

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/devices/ikea.js CHANGED
@@ -121,25 +121,21 @@ const fzLocal = {
121
121
  const tradfriExtend = {
122
122
  light_onoff_brightness: (options = {}) => ({
123
123
  ...extend.light_onoff_brightness(options),
124
- exposes: extend.light_onoff_brightness(options).exposes.concat(e.power_on_behavior()),
125
124
  ota: ota.tradfri,
126
125
  onEvent: bulbOnEvent,
127
126
  }),
128
127
  light_onoff_brightness_colortemp: (options = {colorTempRange: [250, 454]}) => ({
129
128
  ...extend.light_onoff_brightness_colortemp(options),
130
- exposes: extend.light_onoff_brightness_colortemp(options).exposes.concat(e.power_on_behavior()),
131
129
  ota: ota.tradfri,
132
130
  onEvent: bulbOnEvent,
133
131
  }),
134
132
  light_onoff_brightness_colortemp_color: (options = {disableColorTempStartup: true, colorTempRange: [250, 454]}) => ({
135
133
  ...extend.light_onoff_brightness_colortemp_color(options),
136
- exposes: extend.light_onoff_brightness_colortemp_color(options).exposes.concat(e.power_on_behavior()),
137
134
  ota: ota.tradfri,
138
135
  onEvent: bulbOnEvent,
139
136
  }),
140
137
  light_onoff_brightness_color: (options = {}) => ({
141
138
  ...extend.light_onoff_brightness_color(options),
142
- exposes: extend.light_onoff_brightness_color(options).exposes.concat(e.power_on_behavior()),
143
139
  ota: ota.tradfri,
144
140
  onEvent: bulbOnEvent,
145
141
  }),
package/devices/kurvia.js CHANGED
@@ -1,20 +1,16 @@
1
1
  const tz = require('../converters/toZigbee');
2
- const exposes = require('../lib/exposes');
3
2
  const extend = require('../lib/extend');
4
- const e = exposes.presets;
5
3
 
6
4
  const extendData = extend.light_onoff_brightness_colortemp_color({colorTempRange: [250, 454]});
7
5
 
8
-
9
6
  module.exports = [
10
7
  {
11
8
  zigbeeModel: ['ZB-CL01'],
12
9
  model: 'ZB-CL01',
13
10
  vendor: 'KURVIA',
14
11
  description: 'GU10 GRBWC built from AliExpress',
15
- exposes: extendData.exposes.concat(e.power_on_behavior()),
12
+ extend: extendData,
16
13
  toZigbee: [tz.on_off].concat(extendData.toZigbee),
17
- fromZigbee: extendData.fromZigbee,
18
14
  meta: {applyRedFix: true, enhancedHue: false},
19
15
  },
20
16
  ];
package/devices/namron.js CHANGED
@@ -609,8 +609,8 @@ module.exports = [
609
609
  .withDescription('Enables/disables physical input on the device'),
610
610
  exposes.numeric('hysterersis', ea.ALL)
611
611
  .withUnit('°C')
612
- .withValueMin(5).withValueMax(50).withValueStep(0.1)
613
- .withDescription('Hysterersis setting, range is 5-50, unit is 0.1oC, Default: 5.'),
612
+ .withValueMin(0.5).withValueMax(2).withValueStep(0.1)
613
+ .withDescription('Hysteresis setting, default: 0.5'),
614
614
  exposes.numeric('display_brightnesss', ea.ALL)
615
615
  .withValueMin(1).withValueMax(7).withValueStep(1)
616
616
  .withDescription('Adjust brightness of display values 1(Low)-7(High)'),
package/devices/osram.js CHANGED
@@ -302,15 +302,17 @@ module.exports = [
302
302
  model: 'AC01353010G',
303
303
  vendor: 'OSRAM',
304
304
  description: 'SMART+ Motion Sensor',
305
- fromZigbee: [fz.temperature, fz.ias_occupancy_only_alarm_2, fz.ignore_basic_report],
305
+ fromZigbee: [fz.temperature, fz.ias_occupancy_only_alarm_2, fz.ignore_basic_report, fz.battery],
306
306
  toZigbee: [],
307
+ meta: {battery: {voltageToPercentage: {min: 1900, max: 3000}}},
307
308
  configure: async (device, coordinatorEndpoint, logger) => {
308
309
  const endpoint = device.getEndpoint(1);
309
310
  await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
310
311
  await reporting.temperature(endpoint);
311
312
  await reporting.batteryVoltage(endpoint);
313
+ await reporting.batteryAlarmState(endpoint);
312
314
  },
313
- exposes: [e.temperature(), e.occupancy()],
315
+ exposes: [e.temperature(), e.occupancy(), e.battery(), e.battery_voltage(), e.battery_low()],
314
316
  },
315
317
  {
316
318
  zigbeeModel: ['MR16 TW OSRAM'],
@@ -2729,6 +2729,13 @@ module.exports = [
2729
2729
  description: 'Hue white and color ambiance 5/6" retrofit recessed downlight',
2730
2730
  extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
2731
2731
  },
2732
+ {
2733
+ zigbeeModel: ['LCD007'],
2734
+ model: '579573',
2735
+ vendor: 'Philips',
2736
+ description: 'Hue White and Color Ambiance Slim Downlight 6"',
2737
+ extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
2738
+ },
2732
2739
  {
2733
2740
  zigbeeModel: ['LWE004'],
2734
2741
  model: '8719514302235',
@@ -2876,4 +2883,11 @@ module.exports = [
2876
2883
  description: 'Hue white ambiance Garnea downlight',
2877
2884
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
2878
2885
  },
2886
+ {
2887
+ zigbeeModel: ['LTE005'],
2888
+ model: '9290031452',
2889
+ vendor: 'Philips',
2890
+ description: 'Hue white ambiance filament E14 (with Bluetooth)',
2891
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [222, 454]}),
2892
+ },
2879
2893
  ];
package/devices/sonoff.js CHANGED
@@ -195,6 +195,7 @@ module.exports = [
195
195
  description: '15A Zigbee smart plug',
196
196
  extend: extend.switch(),
197
197
  fromZigbee: [fz.on_off_skip_duplicate_transaction],
198
+ ota: ota.zigbeeOTA,
198
199
  configure: async (device, coordinatorEndpoint, logger) => {
199
200
  const endpoint = device.getEndpoint(1);
200
201
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
package/devices/tuya.js CHANGED
@@ -759,7 +759,7 @@ module.exports = [
759
759
  description: 'Smart air house keeper',
760
760
  fromZigbee: [fz.tuya_air_quality],
761
761
  toZigbee: [],
762
- exposes: [e.temperature(), e.humidity(), e.co2(), e.voc(), e.formaldehyd().withUnit('ppm'),
762
+ exposes: [e.temperature(), e.humidity(), e.co2(), e.voc().withUnit('ppm'), e.formaldehyd().withUnit('µg/m³'),
763
763
  e.pm25().withValueMin(0).withValueMax(999).withValueStep(1)],
764
764
  },
765
765
  {
package/lib/legacy.js CHANGED
@@ -114,7 +114,8 @@ const postfixWithEndpointName = (name, msg, definition) => {
114
114
  };
115
115
 
116
116
  const transactionStore = {};
117
- const hasAlreadyProcessedMessage = (msg, transaction=null, key=null) => {
117
+ const hasAlreadyProcessedMessage = (msg, model, transaction=null, key=null) => {
118
+ if (model.meta && model.meta.publishDuplicateTransaction) return false;
118
119
  const current = transaction !== null ? transaction : msg.meta.zclTransactionSequenceNumber;
119
120
  key = key || msg.device.ieeeAddr;
120
121
  if (transactionStore[key] === current) return true;
package/lib/utils.js CHANGED
@@ -179,6 +179,10 @@ function batteryVoltageToPercentage(voltage, option) {
179
179
  } else if (option === 'Add_1V_42V_CSM300z2v2') {
180
180
  voltage = voltage + 1000;
181
181
  percentage = toPercentage(voltage, 2900, 4100);
182
+ // Generic converter that expects an option object with min and max values
183
+ // I.E. meta: {battery: {voltageToPercentage: {min: 1900, max: 3000}}}
184
+ } else if (typeof option === 'object') {
185
+ percentage = toPercentage(voltage, option.min, option.max);
182
186
  } else {
183
187
  throw new Error(`Not batteryVoltageToPercentage type supported: ${option}`);
184
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.658",
3
+ "version": "14.0.660",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [