zigbee-herdsman-converters 14.0.290 → 14.0.294

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.
@@ -3819,6 +3819,17 @@ const converters = {
3819
3819
  }
3820
3820
  },
3821
3821
  },
3822
+ tuya_min_brightness: {
3823
+ cluster: 'genLevelCtrl',
3824
+ type: ['attributeReport', 'readResponse'],
3825
+ convert: (model, msg, publish, options, meta) => {
3826
+ if (msg.data.hasOwnProperty(0xfc00)) {
3827
+ const property = postfixWithEndpointName('min_brightness', msg, model);
3828
+ const value = parseInt(msg.data[0xfc00].toString(16).slice(0, 2), 16);
3829
+ return {[property]: value};
3830
+ }
3831
+ },
3832
+ },
3822
3833
  restorable_brightness: {
3823
3834
  cluster: 'genLevelCtrl',
3824
3835
  type: ['attributeReport', 'readResponse'],
@@ -6854,10 +6865,10 @@ const converters = {
6854
6865
  }
6855
6866
  break;
6856
6867
  case tuya.dataPoints.tvWindowDetection:
6857
- result = {window_detection: {1: false, 0: true}[value]};
6868
+ result = {window_detection: {1: true, 0: false}[value]};
6858
6869
  break;
6859
6870
  case tuya.dataPoints.tvFrostDetection:
6860
- result = {frost_detection: {1: false, 0: true}[value]};
6871
+ result = {frost_detection: {1: true, 0: false}[value]};
6861
6872
  break;
6862
6873
  case tuya.dataPoints.tvHeatingSetpoint:
6863
6874
  result = {current_heating_setpoint: (value / 10).toFixed(1)};
@@ -6920,6 +6931,19 @@ const converters = {
6920
6931
  return {people: msg.data.presentValue};
6921
6932
  },
6922
6933
  },
6934
+ sihas_action: {
6935
+ cluster: 'genOnOff',
6936
+ type: ['commandOn', 'commandOff', 'commandToggle'],
6937
+ convert: (model, msg, publish, options, meta) => {
6938
+ const lookup = {'commandToggle': 'long', 'commandOn': 'double', 'commandOff': 'single'};
6939
+ let buttonMapping = null;
6940
+ if (model.model === 'MSM-300ZB') {
6941
+ buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
6942
+ }
6943
+ const button = buttonMapping ? `${buttonMapping[msg.endpoint.ID]}_` : '';
6944
+ return {action: `${button}${lookup[msg.type]}`};
6945
+ },
6946
+ },
6923
6947
  hoch_din: {
6924
6948
  cluster: 'manuSpecificTuya',
6925
6949
  type: ['commandGetData', 'commandSetDataResponse'],
@@ -2917,6 +2917,20 @@ const converters = {
2917
2917
  await entity.read('manuSpecificTuya_3', ['switchType']);
2918
2918
  },
2919
2919
  },
2920
+ tuya_min_brightness: {
2921
+ key: ['min_brightness'],
2922
+ convertSet: async (entity, key, value, meta) => {
2923
+ const minValueHex = value.toString(16);
2924
+ const maxValueHex = 'ff';
2925
+ const minMaxValue = parseInt(`${minValueHex}${maxValueHex}`, 16);
2926
+ const payload = {0xfc00: {value: minMaxValue, type: 0x21}};
2927
+ await entity.write('genLevelCtrl', payload, {disableDefaultResponse: true});
2928
+ return {state: {min_brightness: value}};
2929
+ },
2930
+ convertGet: async (entity, key, meta) => {
2931
+ await entity.read('genLevelCtrl', [0xfc00]);
2932
+ },
2933
+ },
2920
2934
  frankever_threshold: {
2921
2935
  key: ['threshold'],
2922
2936
  convertSet: async (entity, key, value, meta) => {
@@ -5854,7 +5868,7 @@ const converters = {
5854
5868
  key: [
5855
5869
  'system_mode', 'window_detection', 'frost_detection', 'child_lock',
5856
5870
  'current_heating_setpoint', 'local_temperature_calibration',
5857
- 'holiday_temperature', 'comfort_temperature', 'eco_temperature', 'boost_mode',
5871
+ 'holiday_temperature', 'comfort_temperature', 'eco_temperature',
5858
5872
  'open_window_temperature', 'heating_stop', 'preset',
5859
5873
  ],
5860
5874
  convertSet: async (entity, key, value, meta) => {
@@ -5868,13 +5882,18 @@ const converters = {
5868
5882
  }
5869
5883
  break;
5870
5884
  case 'window_detection':
5871
- await tuya.sendDataPointEnum(entity, tuya.dataPoints.tvWindowDetection, (value) ? 0 : 1);
5885
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.tvWindowDetection, value);
5872
5886
  break;
5873
5887
  case 'frost_detection':
5874
- await tuya.sendDataPointEnum(entity, tuya.dataPoints.tvFrostDetection, (value) ? 0 : 1);
5888
+ if (value == false) {
5889
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.tvFrostDetection, 0);
5890
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.tvMode, 1);
5891
+ } else {
5892
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.tvFrostDetection, 1);
5893
+ }
5875
5894
  break;
5876
5895
  case 'child_lock':
5877
- await tuya.sendDataPointEnum(entity, tuya.dataPoints.tvChildLock, {'unlock': 0, 'lock': 1}[value.toLowerCase()]);
5896
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.tvChildLock, value === 'LOCK');
5878
5897
  break;
5879
5898
  case 'local_temperature_calibration':
5880
5899
  value = Math.round(value * 10);
@@ -183,7 +183,6 @@ module.exports = [
183
183
  description: '[Plant Wattering Sensor]',
184
184
  fromZigbee: [fz.temperature, fz.soil_moisture, fz.battery],
185
185
  toZigbee: [tz.factory_reset],
186
- meta: {disableDefaultResponse: true},
187
186
  configure: async (device, coordinatorEndpoint, logger) => {
188
187
  const firstEndpoint = device.getEndpoint(1);
189
188
  await reporting.bind(firstEndpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement', 'msSoilMoisture']);
@@ -223,7 +222,6 @@ module.exports = [
223
222
  description: '[Plant wattering sensor with e-ink display](https://efektalab.com/epws102)',
224
223
  fromZigbee: [fz.temperature, fz.soil_moisture, fz.battery],
225
224
  toZigbee: [tz.factory_reset],
226
- meta: {disableDefaultResponse: true},
227
225
  configure: async (device, coordinatorEndpoint, logger) => {
228
226
  const firstEndpoint = device.getEndpoint(1);
229
227
  await reporting.bind(firstEndpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement', 'msSoilMoisture']);
package/devices/ikea.js CHANGED
@@ -194,10 +194,8 @@ module.exports = [
194
194
  model: 'LED1624G9',
195
195
  vendor: 'IKEA',
196
196
  description: 'TRADFRI LED bulb E14/E26/E27 600 lumen, dimmable, color, opal white',
197
- extend: extend.light_onoff_brightness_color(),
198
- ota: ota.tradfri,
197
+ extend: tradfriExtend.light_onoff_brightness_colortemp_color(),
199
198
  meta: {supportsHueAndSaturation: false},
200
- onEvent: bulbOnEvent,
201
199
  },
202
200
  {
203
201
  zigbeeModel: ['TRADFRI bulb E26 CWS 800lm', 'TRADFRI bulb E27 CWS 806lm'],
@@ -22,7 +22,7 @@ module.exports = [
22
22
  },
23
23
  {
24
24
  zigbeeModel: ['SV01-410-MP-1.0', 'SV01-410-MP-1.1', 'SV01-410-MP-1.4', 'SV01-410-MP-1.5', 'SV01-412-MP-1.0',
25
- 'SV01-412-MP-1.4', 'SV01-610-MP-1.0', 'SV01-610-MP-1.1', 'SV01-612-MP-1.0'],
25
+ 'SV01-412-MP-1.4', 'SV01-610-MP-1.0', 'SV01-610-MP-1.1', 'SV01-612-MP-1.0', 'SV01-610-MP-1.4'],
26
26
  model: 'SV01',
27
27
  vendor: 'Keen Home',
28
28
  description: 'Smart vent',
package/devices/lupus.js CHANGED
@@ -54,7 +54,7 @@ module.exports = [
54
54
  },
55
55
  },
56
56
  {
57
- zigbeeModel: ['PRS3CH2_00.00.05.10TC', 'PRS3CH2_00.00.05.11TC'],
57
+ zigbeeModel: ['PRS3CH2_00.00.05.10TC', 'PRS3CH2_00.00.05.11TC', 'PRS3CH2_00.00.05.12TC'],
58
58
  model: '12127',
59
59
  vendor: 'Lupus',
60
60
  description: '2 chanel relay',
@@ -47,6 +47,15 @@ module.exports = [
47
47
  extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
48
48
  ota: ota.zigbeeOTA,
49
49
  },
50
+ {
51
+ zigbeeModel: ['5633031P9'],
52
+ model: '5633031P9',
53
+ vendor: 'Philips',
54
+ description: 'Hue White ambiance Pillar spotlight',
55
+ meta: {turnsOffAtBrightness1: true},
56
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
57
+ ota: ota.zigbeeOTA,
58
+ },
50
59
  {
51
60
  zigbeeModel: ['929002376301'],
52
61
  model: '929002376301',
@@ -1877,6 +1886,15 @@ module.exports = [
1877
1886
  meta: {turnsOffAtBrightness1: true},
1878
1887
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [222, 454]}),
1879
1888
  },
1889
+ {
1890
+ zigbeeModel: ['LTV004'],
1891
+ model: '929002478401',
1892
+ vendor: 'Philips',
1893
+ description: 'Hue white filament Edison ST19 E26 LED warm-to-cool',
1894
+ ota: ota.zigbeeOTA,
1895
+ meta: {turnsOffAtBrightness1: true},
1896
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [222, 454]}),
1897
+ },
1880
1898
  {
1881
1899
  zigbeeModel: ['LWV002'],
1882
1900
  model: '046677551780',
@@ -70,7 +70,7 @@ module.exports = [
70
70
  exposes: [e.contact(), e.battery_low(), e.tamper(), e.temperature(), e.battery()],
71
71
  },
72
72
  {
73
- zigbeeModel: ['SZ-DWS08N'],
73
+ zigbeeModel: ['SZ-DWS08N', 'SZ-DWS08'],
74
74
  model: 'SZ-DWS08',
75
75
  vendor: 'Sercomm',
76
76
  description: 'Magnetic door & window contact sensor',
@@ -11,7 +11,7 @@ module.exports = [
11
11
  zigbeeModel: ['CSM-300Z'],
12
12
  model: 'CSM-300ZB',
13
13
  vendor: 'ShinaSystem',
14
- description: 'Sihas multipurpose sensor',
14
+ description: 'SiHAS multipurpose sensor',
15
15
  meta: {battery: {voltageToPercentage: '3V_2100'}},
16
16
  fromZigbee: [fz.battery, fz.sihas_people_cnt],
17
17
  toZigbee: [tz.sihas_set_people],
@@ -30,7 +30,7 @@ module.exports = [
30
30
  zigbeeModel: ['USM-300Z'],
31
31
  model: 'USM-300ZB',
32
32
  vendor: 'ShinaSystem',
33
- description: 'Sihas multipurpose sensor',
33
+ description: 'SiHAS multipurpose sensor',
34
34
  meta: {battery: {voltageToPercentage: '3V_2100'}},
35
35
  fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.occupancy, fz.illuminance],
36
36
  toZigbee: [],
@@ -49,9 +49,9 @@ module.exports = [
49
49
  },
50
50
  {
51
51
  zigbeeModel: ['SBM300Z1'],
52
- model: 'SBM-300-ZB1',
52
+ model: 'SBM300Z1',
53
53
  vendor: 'ShinaSystem',
54
- description: 'IOT smart switch 1 gang',
54
+ description: 'SiHAS IOT smart switch 1 gang',
55
55
  extend: extend.switch(),
56
56
  configure: async (device, coordinatorEndpoint, logger) => {
57
57
  const endpoint = device.getEndpoint(1);
@@ -61,9 +61,9 @@ module.exports = [
61
61
  },
62
62
  {
63
63
  zigbeeModel: ['SBM300Z2'],
64
- model: 'SBM-300-ZB2',
64
+ model: 'SBM300Z2',
65
65
  vendor: 'ShinaSystem',
66
- description: 'IOT smart switch 2 gang',
66
+ description: 'SiHAS IOT smart switch 2 gang',
67
67
  extend: extend.switch(),
68
68
  exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom')],
69
69
  endpoint: (device) => {
@@ -79,9 +79,9 @@ module.exports = [
79
79
  },
80
80
  {
81
81
  zigbeeModel: ['SBM300Z3'],
82
- model: 'SBM-300-ZB3',
82
+ model: 'SBM300Z3',
83
83
  vendor: 'ShinaSystem',
84
- description: 'IOT smart switch 3 gang',
84
+ description: 'SiHAS IOT smart switch 3 gang',
85
85
  extend: extend.switch(),
86
86
  exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('center'), e.switch().withEndpoint('bottom')],
87
87
  endpoint: (device) => {
@@ -99,9 +99,9 @@ module.exports = [
99
99
  },
100
100
  {
101
101
  zigbeeModel: ['SBM300Z4'],
102
- model: 'SBM-300-ZB4',
102
+ model: 'SBM300Z4',
103
103
  vendor: 'ShinaSystem',
104
- description: 'IOT smart switch 4 gang',
104
+ description: 'SiHAS IOT smart switch 4 gang',
105
105
  extend: extend.switch(),
106
106
  exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('bottom_left'),
107
107
  e.switch().withEndpoint('top_right'), e.switch().withEndpoint('bottom_right')],
@@ -122,9 +122,9 @@ module.exports = [
122
122
  },
123
123
  {
124
124
  zigbeeModel: ['SBM300Z5'],
125
- model: 'SBM-300-ZB5',
125
+ model: 'SBM300Z5',
126
126
  vendor: 'ShinaSystem',
127
- description: 'IOT smart switch 5 gang',
127
+ description: 'SiHAS IOT smart switch 5 gang',
128
128
  extend: extend.switch(),
129
129
  exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('top_right'), e.switch().withEndpoint('center_left'),
130
130
  e.switch().withEndpoint('bottom_left'), e.switch().withEndpoint('bottom_right')],
@@ -147,9 +147,9 @@ module.exports = [
147
147
  },
148
148
  {
149
149
  zigbeeModel: ['SBM300Z6'],
150
- model: 'SBM-300-ZB6',
150
+ model: 'SBM300Z6',
151
151
  vendor: 'ShinaSystem',
152
- description: 'IOT smart switch 6 gang',
152
+ description: 'SiHAS IOT smart switch 6 gang',
153
153
  extend: extend.switch(),
154
154
  exposes: [e.switch().withEndpoint('top_left'), e.switch().withEndpoint('bottom_left'), e.switch().withEndpoint('center_left'),
155
155
  e.switch().withEndpoint('center_right'), e.switch().withEndpoint('top_right'), e.switch().withEndpoint('bottom_right')],
@@ -172,4 +172,68 @@ module.exports = [
172
172
  await reporting.onOff(device.getEndpoint(6));
173
173
  },
174
174
  },
175
+ {
176
+ zigbeeModel: ['BSM-300Z'],
177
+ model: 'BSM-300ZB',
178
+ vendor: 'ShinaSystem',
179
+ description: 'SiHAS remote control',
180
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
181
+ fromZigbee: [fz.battery, fz.sihas_action],
182
+ toZigbee: [],
183
+ configure: async (device, coordinatorEndpoint, logger) => {
184
+ const endpoint = device.getEndpoint(1);
185
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
186
+ await reporting.batteryVoltage(endpoint);
187
+ },
188
+ exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
189
+ },
190
+ {
191
+ zigbeeModel: ['TSM-300Z'],
192
+ model: 'TSM-300ZB',
193
+ vendor: 'ShinaSystem',
194
+ description: 'SiHAS temperature/humidity sensor',
195
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
196
+ fromZigbee: [fz.temperature, fz.humidity, fz.battery],
197
+ toZigbee: [],
198
+ configure: async (device, coordinatorEndpoint, logger) => {
199
+ const endpoint = device.getEndpoint(1);
200
+ await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'msRelativeHumidity', 'genPowerCfg']);
201
+ await reporting.temperature(endpoint, {min: 30, max: 300, change: 30});
202
+ await reporting.humidity(endpoint, {min: 30, max: 3600, change: 50});
203
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
204
+ },
205
+ exposes: [e.temperature(), e.humidity(), e.battery(), e.battery_voltage()],
206
+ },
207
+ {
208
+ zigbeeModel: ['DSM-300Z'],
209
+ model: 'DSM-300ZB',
210
+ vendor: 'ShinaSystem',
211
+ description: 'SiHAS contact sensor',
212
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
213
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
214
+ toZigbee: [],
215
+ configure: async (device, coordinatorEndpoint, logger) => {
216
+ const endpoint = device.getEndpoint(1);
217
+ await reporting.bind(endpoint, coordinatorEndpoint, ['ssIasZone', 'genPowerCfg']);
218
+ await endpoint.read('ssIasZone', ['iasCieAddr', 'zoneState', 'zoneId']);
219
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
220
+ },
221
+ exposes: [e.contact(), e.battery(), e.battery_voltage()],
222
+ },
223
+ {
224
+ zigbeeModel: ['MSM-300Z'],
225
+ model: 'MSM-300ZB',
226
+ vendor: 'ShinaSystem',
227
+ description: 'SiHAS remote control 4 button',
228
+ fromZigbee: [fz.sihas_action, fz.battery],
229
+ toZigbee: [],
230
+ exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
231
+ '3_single', '3_double', '3_long', '4_single', '4_double', '4_long']), e.battery(), e.battery_voltage()],
232
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
233
+ configure: async (device, coordinatorEndpoint, logger) => {
234
+ const endpoint = device.getEndpoint(1);
235
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
236
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
237
+ },
238
+ },
175
239
  ];
@@ -29,7 +29,8 @@ module.exports = [
29
29
  {vendor: 'TuYa', description: 'Głowica termostatyczna', model: 'GTZ02'},
30
30
  {vendor: 'Revolt', description: 'Thermostatic Radiator Valve Controller', model: 'NX-4911'},
31
31
  {vendor: 'Unitec', description: 'Thermostatic Radiator Valve Controller', model: '30946'},
32
- {vendor: 'Tesla', description: 'Thermostatic Radiator Valve Controller', model: 'TSL-TRV-GS361A'}],
32
+ {vendor: 'Tesla', description: 'Thermostatic Radiator Valve Controller', model: 'TSL-TRV-GS361A'},
33
+ {vendor: 'Nedis', description: 'Thermostatic Radiator Valve Controller', model: 'ZBHTR10WT'}],
33
34
  exposes: [e.child_lock(), e.window_detection(), e.battery(), e.valve_detection(), e.position(), exposes.climate()
34
35
  .withSetpoint('current_heating_setpoint', 5, 30, 0.5, ea.STATE_SET).withLocalTemperature(ea.STATE)
35
36
  .withSystemMode(['off', 'auto', 'heat'], ea.STATE_SET)
package/devices/tuya.js CHANGED
@@ -103,11 +103,13 @@ module.exports = [
103
103
  {
104
104
  fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_qqjaziws'},
105
105
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_jtmhndw2'},
106
+ {modelID: 'TS0505B', manufacturerName: '_TZ3000_ezlg0pht'},
106
107
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_5snkkrxw'},
107
108
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_12sxjap4'},
108
109
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_x2fqbdun'},
109
110
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_589kq4ul'},
110
- {modelID: 'TS0505B', manufacturerName: '_TZ3000_1mtktxdk'}],
111
+ {modelID: 'TS0505B', manufacturerName: '_TZ3000_1mtktxdk'},
112
+ {modelID: 'TS0505B', manufacturerName: '_TZ3210_bicjqpg4'}],
111
113
  model: 'TS0505B',
112
114
  vendor: 'TuYa',
113
115
  description: 'Zigbee RGB+CCT light',
@@ -422,6 +424,7 @@ module.exports = [
422
424
  {
423
425
  fingerprint: [
424
426
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_s1x7gcq0'},
427
+ {modelID: 'TS0502B', manufacturerName: '_TZ3000_muqovqv0'},
425
428
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_hi1ym4bl'},
426
429
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_psgq7ysz'},
427
430
  {modelID: 'TS0502B', manufacturerName: '_TZ3000_zw7wr5uo'},
@@ -596,9 +599,10 @@ module.exports = [
596
599
  whiteLabel: [{vendor: 'OXT', model: 'SWTZ21'}],
597
600
  toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
598
601
  fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
599
- exposes: extend.switch().exposes.concat([exposes.presets.power_on_behavior(),
600
- exposes.enum('switch_type', ea.ALL, ['toggle', 'state', 'momentary'])
601
- .withDescription('Switch type settings')]),
602
+ exposes: extend.switch().exposes.concat([
603
+ exposes.presets.power_on_behavior(),
604
+ exposes.presets.switch_type_2(),
605
+ ]),
602
606
  configure: async (device, coordinatorEndpoint, logger) => {
603
607
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
604
608
  },
@@ -611,8 +615,12 @@ module.exports = [
611
615
  whiteLabel: [{vendor: 'OXT', model: 'SWTZ22'}],
612
616
  toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
613
617
  fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
614
- exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), exposes.presets.power_on_behavior(),
615
- exposes.enum('switch_type', ea.ALL, ['toggle', 'state', 'momentary']).withDescription('Switch type settings')],
618
+ exposes: [
619
+ e.switch().withEndpoint('l1'),
620
+ e.switch().withEndpoint('l2'),
621
+ exposes.presets.power_on_behavior(),
622
+ exposes.presets.switch_type_2(),
623
+ ],
616
624
  endpoint: (device) => {
617
625
  return {'l1': 1, 'l2': 2};
618
626
  },
@@ -622,6 +630,58 @@ module.exports = [
622
630
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
623
631
  },
624
632
  },
633
+ {
634
+ fingerprint: [{modelID: 'TS0003', manufacturerName: '_TZ3000_vsasbzkf'}],
635
+ model: 'TS0003_switch_module',
636
+ vendor: 'TuYa',
637
+ description: '3 gang switch module',
638
+ whiteLabel: [{vendor: 'OXT', model: 'SWTZ23'}],
639
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
640
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
641
+ exposes: [
642
+ e.switch().withEndpoint('l1'),
643
+ e.switch().withEndpoint('l2'),
644
+ e.switch().withEndpoint('l3'),
645
+ exposes.presets.power_on_behavior(),
646
+ exposes.presets.switch_type_2(),
647
+ ],
648
+ endpoint: (device) => {
649
+ return {'l1': 1, 'l2': 2, 'l3': 3};
650
+ },
651
+ meta: {multiEndpoint: true},
652
+ configure: async (device, coordinatorEndpoint, logger) => {
653
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
654
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
655
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
656
+ },
657
+ },
658
+ {
659
+ fingerprint: [{modelID: 'TS0004', manufacturerName: '_TZ3000_ltt60asa'}],
660
+ model: 'TS0004_switch_module',
661
+ vendor: 'TuYa',
662
+ description: '4 gang switch module',
663
+ whiteLabel: [{vendor: 'OXT', model: 'SWTZ27'}],
664
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
665
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
666
+ exposes: [
667
+ e.switch().withEndpoint('l1'),
668
+ e.switch().withEndpoint('l2'),
669
+ e.switch().withEndpoint('l3'),
670
+ e.switch().withEndpoint('l4'),
671
+ exposes.presets.power_on_behavior(),
672
+ exposes.presets.switch_type_2(),
673
+ ],
674
+ endpoint: (device) => {
675
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4};
676
+ },
677
+ meta: {multiEndpoint: true},
678
+ configure: async (device, coordinatorEndpoint, logger) => {
679
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
680
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
681
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
682
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
683
+ },
684
+ },
625
685
  {
626
686
  zigbeeModel: [
627
687
  'owvfni3\u0000', 'owvfni3', 'u1rkty3', 'aabybja', // Curtain motors
@@ -686,13 +746,12 @@ module.exports = [
686
746
  {
687
747
  zigbeeModel: ['kud7u2l'],
688
748
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_ckud7u2l'}, {modelID: 'TS0601', manufacturerName: '_TZE200_ywdxldoj'},
689
- {modelID: 'TS0601', manufacturerName: '_TZE200_cwnjrr72'}, {modelID: 'TS0601', manufacturerName: '_TZE200_chyvmhay'},
690
- {modelID: 'TS0601', manufacturerName: '_TZE200_a4bpgplm'}],
749
+ {modelID: 'TS0601', manufacturerName: '_TZE200_cwnjrr72'}, {modelID: 'TS0601', manufacturerName: '_TZE200_chyvmhay'}],
691
750
  model: 'TS0601_thermostat',
692
751
  vendor: 'TuYa',
693
752
  description: 'Radiator valve with thermostat',
694
753
  whiteLabel: [{vendor: 'Moes', model: 'HY368'}, {vendor: 'Moes', model: 'HY369RT'}, {vendor: 'SHOJZJ', model: '378RT'},
695
- {vendor: 'Silvercrest', model: 'TVR01'}, {vendor: 'Haozee', model: 'TRV601'}],
754
+ {vendor: 'Silvercrest', model: 'TVR01'}],
696
755
  meta: {tuyaThermostatPreset: tuya.thermostatPresets, tuyaThermostatSystemMode: tuya.thermostatSystemModes3},
697
756
  ota: ota.zigbeeOTA,
698
757
  onEvent: tuya.onEventSetLocalTime,
@@ -800,7 +859,14 @@ module.exports = [
800
859
  },
801
860
  },
802
861
  {
803
- fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cphmq0q7'},
862
+ fingerprint: [{modelID: 'TS0111', manufacturerName: '_TYZB01_ymcdbl3u'}],
863
+ model: 'TS0111_valve',
864
+ vendor: 'TuYa',
865
+ description: 'Smart water/gas valve',
866
+ extend: extend.switch(),
867
+ },
868
+ {
869
+ fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cphmq0q7', applicationVersion: 67},
804
870
  {modelID: 'TS011F', manufacturerName: '_TZ3000_ew3ldmgx'},
805
871
  {modelID: 'TS011F', manufacturerName: '_TZ3000_ps3dmato'},
806
872
  {modelID: 'TS011F', manufacturerName: '_TZ3000_mraovvmm'},
@@ -841,7 +907,8 @@ module.exports = [
841
907
  .withDescription('Recover state after power outage')],
842
908
  },
843
909
  {
844
- fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_dpo1ysak'}],
910
+ fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_dpo1ysak'},
911
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_cphmq0q7', applicationVersion: 69}],
845
912
  model: 'TS011F_plug_3',
846
913
  description: 'Smart plug (with power monitoring by polling)',
847
914
  vendor: 'TuYa',
@@ -902,6 +969,32 @@ module.exports = [
902
969
  },
903
970
  exposes: [e.switch().setAccess('state', ea.STATE_SET), e.voltage(), e.power(), e.current(), e.energy()],
904
971
  },
972
+ {
973
+ fingerprint: [{modelID: 'TS1101', manufacturerName: '_TZ3000_7ysdnebc'}],
974
+ model: 'TS1101_dimmer_module',
975
+ vendor: 'TuYa',
976
+ description: '2CH Zigbee dimmer module',
977
+ whiteLabel: [{vendor: 'OXT', model: 'SWTZ25'}],
978
+ fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([
979
+ fz.tuya_min_brightness,
980
+ ]),
981
+ toZigbee: extend.light_onoff_brightness().toZigbee.concat([
982
+ tz.tuya_min_brightness,
983
+ ]),
984
+ exposes: [
985
+ e.light_brightness().withMinBrightness().withEndpoint('l1'),
986
+ e.light_brightness().withMinBrightness().withEndpoint('l2'),
987
+ ],
988
+ endpoint: (device) => {
989
+ return {'l1': 1, 'l2': 2};
990
+ },
991
+ meta: {multiEndpoint: true},
992
+ configure: async (device, coordinatorEndpoint, logger) => {
993
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
994
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
995
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
996
+ },
997
+ },
905
998
  {
906
999
  zigbeeModel: ['RH3001'],
907
1000
  fingerprint: [{type: 'EndDevice', manufacturerID: 4098, applicationVersion: 66, endpoints: [
package/lib/exposes.js CHANGED
@@ -211,6 +211,12 @@ class Light extends Base {
211
211
  return this;
212
212
  }
213
213
 
214
+ withMinBrightness() {
215
+ assert(!this.endpoint, 'Cannot add feature after adding endpoint');
216
+ this.features.push(new Numeric('min_brightness', access.ALL).withValueMin(1).withValueMax(255).withDescription('Minimum light brightness'));
217
+ return this;
218
+ }
219
+
214
220
  withLevelConfig() {
215
221
  assert(!this.endpoint, 'Cannot add feature after adding endpoint');
216
222
  const levelConfig = new Composite('level_config', 'level_config')
@@ -557,6 +563,7 @@ module.exports = {
557
563
  sound_volume: () => new Enum('sound_volume', access.ALL, constants.lockSoundVolume).withDescription('Sound volume of the lock'),
558
564
  switch: () => new Switch().withState('state', true, 'On/off state of the switch'),
559
565
  switch_type: () => new Enum('switch_type', access.ALL, ['toggle', 'momentary']).withDescription('Wall switch type'),
566
+ switch_type_2: () => new Enum('switch_type', access.ALL, ['toggle', 'state', 'momentary']).withDescription('Switch type settings'),
560
567
  tamper: () => new Binary('tamper', access.STATE, true, false).withDescription('Indicates whether the device is tampered'),
561
568
  temperature: () => new Numeric('temperature', access.STATE).withUnit('°C').withDescription('Measured temperature value'),
562
569
  test: () => new Binary('test', access.STATE, true, false).withDescription('Indicates whether the device is being tested'),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.290",
3
+ "version": "14.0.294",
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.290",
3
+ "version": "14.0.294",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [