zigbee-herdsman-converters 14.0.596 → 14.0.597

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.
@@ -162,13 +162,17 @@ module.exports = [
162
162
  exposes: [e.battery(), e.action([
163
163
  'color_move', 'color_temperature_move', 'hue_move', 'hue_stop', 'brightness_step_up', 'brightness_step_down',
164
164
  'recall_*', 'on', 'off']),
165
- // exposes.composite('action_color', 'action_color') * At the moment not shown in Frontend correctly
166
- // .withFeature(exposes.numeric('x', ea.STATE)) see: https://github.com/nurikk/zigbee2mqtt-frontend/issues/1535
167
- // .withFeature(exposes.numeric('y', ea.STATE)),
168
- exposes.numeric('action_color_temperature', ea.STATE).withUnit('mired'),
169
- exposes.numeric('action_group', ea.STATE),
165
+ exposes.composite('action_color', 'action_color')
166
+ .withFeature(exposes.numeric('x', ea.STATE))
167
+ .withFeature(exposes.numeric('y', ea.STATE))
168
+ .withDescription('Only shows the transmitted color in X7Y-Mode. Noch changes possible.'),
169
+ exposes.numeric('action_color_temperature', ea.STATE).withUnit('mired')
170
+ .withDescription('color temperature value. Fixed values for each key press: 145, 175, 222, 304, 480 mired'),
171
+ exposes.numeric('action_group', ea.STATE)
172
+ .withDescription('Shows the zigbee2mqtt group bound to the active data point EP(1-4).'),
170
173
  exposes.numeric('action_transition_time', ea.STATE),
171
- exposes.text('action_color', ea.STATE)],
174
+ exposes.numeric('action_step_size', ea.STATE),
175
+ exposes.numeric('action_rate', ea.STATE)],
172
176
  toZigbee: [],
173
177
  meta: {multiEndpoint: true},
174
178
  endpoint: (device) => {
@@ -9,7 +9,12 @@ const ea = exposes.access;
9
9
 
10
10
  module.exports = [
11
11
  {
12
- zigbeeModel: ['CSM-300Z'],
12
+ fingerprint: [
13
+ {modelID: 'CSM-300Z', applicationVersion: 1},
14
+ {modelID: 'CSM-300Z', applicationVersion: 2},
15
+ {modelID: 'CSM-300Z', applicationVersion: 3},
16
+ {modelID: 'CSM-300Z', applicationVersion: 4},
17
+ ],
13
18
  model: 'CSM-300ZB',
14
19
  vendor: 'ShinaSystem',
15
20
  description: 'SiHAS multipurpose sensor',
@@ -24,7 +29,27 @@ module.exports = [
24
29
  const payload = reporting.payload('presentValue', 1, 600, 0);
25
30
  await endpoint.configureReporting('genAnalogInput', payload);
26
31
  },
32
+ exposes: [e.battery(), e.battery_voltage(),
33
+ exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
34
+ exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(50).withDescription('People count')],
35
+ },
36
+ {
37
+ zigbeeModel: ['CSM-300Z'],
38
+ model: 'CSM-300ZB_V2',
39
+ vendor: 'ShinaSystem',
27
40
  ota: ota.zigbeeOTA,
41
+ description: 'SiHAS multipurpose ToF sensor',
42
+ meta: {battery: {voltageToPercentage: 'Add_1V_42V_CSM300z2v2'}},
43
+ fromZigbee: [fz.battery, fz.sihas_people_cnt],
44
+ toZigbee: [tz.sihas_set_people],
45
+ configure: async (device, coordinatorEndpoint, logger) => {
46
+ const endpoint = device.getEndpoint(1);
47
+ const binds = ['genPowerCfg', 'genAnalogInput'];
48
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
49
+ await reporting.batteryVoltage(endpoint);
50
+ const payload = reporting.payload('presentValue', 1, 600, 0);
51
+ await endpoint.configureReporting('genAnalogInput', payload);
52
+ },
28
53
  exposes: [e.battery(), e.battery_voltage(),
29
54
  exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
30
55
  exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(50).withDescription('People count')],
package/devices/xiaomi.js CHANGED
@@ -101,6 +101,7 @@ module.exports = [
101
101
  e.light_brightness_colortemp([153, 370]).removeFeature('color_temp_startup').withEndpoint('l2'),
102
102
  exposes.enum('dimmer_mode', ea.ALL, ['rgbw', 'dual_ct'])
103
103
  .withDescription('Switch between rgbw mode or dual color temperature mode')],
104
+ ota: ota.zigbeeOTA,
104
105
  },
105
106
  {
106
107
  zigbeeModel: ['lumi.light.aqcn02'],
@@ -1877,6 +1878,7 @@ module.exports = [
1877
1878
  configure: async (device, coordinatorEndpoint, logger) => {
1878
1879
  await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
1879
1880
  },
1881
+ ota: ota.zigbeeOTA,
1880
1882
  },
1881
1883
  {
1882
1884
  zigbeeModel: ['lumi.switch.b2lc04'],
@@ -1908,6 +1910,7 @@ module.exports = [
1908
1910
  configure: async (device, coordinatorEndpoint, logger) => {
1909
1911
  await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
1910
1912
  },
1913
+ ota: ota.zigbeeOTA,
1911
1914
  },
1912
1915
  {
1913
1916
  zigbeeModel: ['lumi.airmonitor.acn01'],
package/lib/utils.js CHANGED
@@ -170,6 +170,12 @@ function batteryVoltageToPercentage(voltage, option) {
170
170
  percentage = toPercentage(voltage, 2850, 3200);
171
171
  } else if (option === '4LR6AA1_5v') {
172
172
  percentage = toPercentage(voltage, 3000, 4200);
173
+ } else if (option === '3V_add 1V') {
174
+ voltage = voltage + 1000;
175
+ percentage = toPercentage(voltage, 3200, 4200);
176
+ } else if (option === 'Add_1V_42V_CSM300z2v2') {
177
+ voltage = voltage + 1000;
178
+ percentage = toPercentage(voltage, 2900, 4100);
173
179
  } else {
174
180
  throw new Error(`Not batteryVoltageToPercentage type supported: ${option}`);
175
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.596",
3
+ "version": "14.0.597",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [