zigbee-herdsman-converters 14.0.534 → 14.0.537

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.
@@ -5267,7 +5267,7 @@ const converters = {
5267
5267
  const value = tuya.getDataValue(dpValue);
5268
5268
  const state = value ? 'ON' : 'OFF';
5269
5269
  if (multiEndpoint) {
5270
- const lookup = {1: 'l1', 2: 'l2', 3: 'l3', 4: 'l4'};
5270
+ const lookup = {1: 'l1', 2: 'l2', 3: 'l3', 4: 'l4', 5: 'l5', 6: 'l6'};
5271
5271
  const endpoint = lookup[dp];
5272
5272
  if (endpoint in model.endpoint(msg.device)) {
5273
5273
  return {[`state_${endpoint}`]: state};
@@ -7304,9 +7304,9 @@ const converters = {
7304
7304
  const value = tuya.getDataValue(dpValue);
7305
7305
  switch (dp) {
7306
7306
  case 2:
7307
- return {illuminance_lux: value.toFixed(0)};
7307
+ return {illuminance_lux: value};
7308
7308
  case 4:
7309
- return {battery: value.toFixed(1)};
7309
+ return {battery: value};
7310
7310
  case 1:
7311
7311
  return {battery_low: value.toFixed(1)};
7312
7312
  default:
@@ -3842,7 +3842,7 @@ const converters = {
3842
3842
  tuya_switch_state: {
3843
3843
  key: ['state'],
3844
3844
  convertSet: async (entity, key, value, meta) => {
3845
- const lookup = {l1: 1, l2: 2, l3: 3, l4: 4};
3845
+ const lookup = {l1: 1, l2: 2, l3: 3, l4: 4, l5: 5, l6: 6};
3846
3846
  const multiEndpoint = utils.getMetaValue(entity, meta.mapped, 'multiEndpoint', 'allEqual', false);
3847
3847
  const keyid = multiEndpoint ? lookup[meta.endpoint_name] : 1;
3848
3848
  await tuya.sendDataPointBool(entity, keyid, value === 'ON');
@@ -8,6 +8,32 @@ const e = exposes.presets;
8
8
  const ea = exposes.access;
9
9
  const constants = require('../lib/constants');
10
10
 
11
+ const fzLocal = {
12
+ thermostat_3156105: {
13
+ cluster: 'hvacThermostat',
14
+ type: ['attributeReport', 'readResponse'],
15
+ convert: (model, msg, publish, options, meta) => {
16
+ if (msg.data.hasOwnProperty('runningState')) {
17
+ if (msg.data['runningState'] == 1) {
18
+ msg.data['runningState'] = 0;
19
+ } else if (msg.data['runningState'] == 5) {
20
+ msg.data['runningState'] = 4;
21
+ } else if (msg.data['runningState'] == 7) {
22
+ msg.data['runningState'] = 6;
23
+ } else if (msg.data['runningState'] == 13) {
24
+ msg.data['runningState'] = 9;
25
+ }
26
+ }
27
+ if (msg.data.hasOwnProperty('ctrlSeqeOfOper')) {
28
+ if (msg.data['ctrlSeqeOfOper'] == 6) {
29
+ msg.data['ctrlSeqeOfOper'] = 4;
30
+ }
31
+ }
32
+ return fz.thermostat.convert(model, msg, publish, options, meta);
33
+ },
34
+ },
35
+ };
36
+
11
37
  module.exports = [
12
38
  {
13
39
  zigbeeModel: ['4256251-RZHAC'],
@@ -195,7 +221,7 @@ module.exports = [
195
221
  model: '3156105',
196
222
  vendor: 'Centralite',
197
223
  description: 'HA thermostat',
198
- fromZigbee: [fz.battery, fz.thermostat, fz.fan, fz.ignore_time_read],
224
+ fromZigbee: [fz.battery, fzLocal.thermostat_3156105, fz.fan, fz.ignore_time_read],
199
225
  toZigbee: [tz.factory_reset, tz.thermostat_local_temperature,
200
226
  tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_cooling_setpoint,
201
227
  tz.thermostat_setpoint_raise_lower, tz.thermostat_remote_sensing,
@@ -88,7 +88,7 @@ module.exports = [
88
88
  'Valve Characteristic Lost'),
89
89
  exposes.binary('adaptation_run_settings', ea.ALL, true, false)
90
90
  .withDescription('Automatic adaptation run enabled (the one during the night)'),
91
- exposes.enum('adaptation_run_control', ea.ALL, ['initate_adaptation', 'cancel_adaptation'])
91
+ exposes.enum('adaptation_run_control', ea.ALL, ['none', 'initiate_adaptation', 'cancel_adaptation'])
92
92
  .withDescription('Adaptation run control: Initiate Adaptation Run or Cancel Adaptation Run'),
93
93
  exposes.numeric('regulation_setpoint_offset', ea.ALL)
94
94
  .withDescription('Regulation SetPoint Offset in range -2.5°C to 2.5°C in steps of 0.1°C. Value 2.5°C = 25.')
package/devices/ecodim.js CHANGED
@@ -127,7 +127,8 @@ module.exports = [
127
127
  extend: extend.light_onoff_brightness(),
128
128
  },
129
129
  {
130
- fingerprint: [{modelID: 'CCT Light', manufacturerName: 'ZigBee/CCT', manufacturerID: 4137}],
130
+ fingerprint: [{modelID: 'CCT Light', manufacturerName: 'ZigBee/CCT', manufacturerID: 4137},
131
+ {modelID: 'CCT Light', manufacturerName: 'Astuta/ZB-CCT', manufacturerID: 4137}],
131
132
  model: 'ED-10041',
132
133
  vendor: 'EcoDim',
133
134
  description: 'Zigbee LED filament light dimmable E27, edison ST64, flame 2200K',
@@ -267,7 +267,7 @@ module.exports = [
267
267
  vendor: 'Gledopto',
268
268
  ota: ota.zigbeeOTA,
269
269
  description: 'Zigbee LED Controller RGB+CCT (pro)',
270
- whiteLabel: [{vendor: 'Gledopto', model: 'GL-C-001P'}],
270
+ whiteLabel: [{vendor: 'Gledopto', model: 'GL-C-001P'}, {vendor: 'Gledopto', model: 'GL-C-002P'}],
271
271
  extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495], noConfigure: true}),
272
272
  meta: {disableDefaultResponse: true},
273
273
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -8,7 +8,7 @@ const e = exposes.presets;
8
8
  module.exports = [
9
9
  {
10
10
  zigbeeModel: ['tint-ExtendedColor'],
11
- model: '404036/45327',
11
+ model: '404036/45327/45317',
12
12
  vendor: 'Müller Licht',
13
13
  description: 'Tint LED white+color',
14
14
  extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 556]}),
@@ -157,18 +157,10 @@ module.exports = [
157
157
  toZigbee: [],
158
158
  },
159
159
  {
160
- zigbeeModel: ['tint-ColorTemperature'],
161
- model: '404037',
160
+ zigbeeModel: ['tint-ColorTemperature', 'tint-ColorTemperature2'],
161
+ model: '404037/404038',
162
162
  vendor: 'Müller Licht',
163
- description: 'Tint retro filament LED-bulb E27, Edison bulb gold, white+ambiance (1800-6500K), dimmable, 5,5W',
164
- extend: extend.light_onoff_brightness_colortemp(),
165
- toZigbee: extend.light_onoff_brightness_colortemp().toZigbee.concat([tz.tint_scene]),
166
- },
167
- {
168
- zigbeeModel: ['tint-ColorTemperature2'],
169
- model: '404038',
170
- vendor: 'Müller Licht',
171
- description: 'Tint retro filament LED-bulb E27, Globe bulb gold, white+ambiance (1800-6500K), dimmable, 5,5W',
163
+ description: 'CCT LED-bulb',
172
164
  extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 555]}),
173
165
  toZigbee: extend.light_onoff_brightness_colortemp().toZigbee.concat([tz.tint_scene]),
174
166
  },
@@ -207,11 +207,12 @@ module.exports = [
207
207
  description: 'Door sensor',
208
208
  fromZigbee: [fz.ias_contact_alarm_1, fz.battery, fz.ignore_basic_report, fz.ias_contact_alarm_1_report],
209
209
  toZigbee: [],
210
- exposes: [e.contact(), e.battery()],
210
+ exposes: [e.contact(), e.battery(), e.battery_voltage()],
211
211
  configure: async (device, coordinatorEndpoint, logger) => {
212
212
  const endpoint = device.getEndpoint(1);
213
213
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
214
214
  await reporting.batteryPercentageRemaining(endpoint);
215
+ await reporting.batteryVoltage(endpoint);
215
216
  },
216
217
  },
217
218
  {
@@ -26,15 +26,19 @@ module.exports = [
26
26
  model: 'SZ-ESW01-AU',
27
27
  vendor: 'Sercomm',
28
28
  description: 'Telstra smart plug',
29
- exposes: [e.switch(), e.power()],
30
- fromZigbee: [fz.on_off, fz.metering],
29
+ exposes: [e.switch(), e.power(), e.energy(), e.current(), e.voltage()],
30
+ fromZigbee: [fz.on_off, fz.metering, fz.electrical_measurement],
31
31
  toZigbee: [tz.on_off],
32
32
  configure: async (device, coordinatorEndpoint, logger) => {
33
33
  const endpoint = device.getEndpoint(1);
34
- await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
34
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering', 'haElectricalMeasurement']);
35
35
  await reporting.onOff(endpoint);
36
36
  await reporting.instantaneousDemand(endpoint);
37
+ await reporting.currentSummDelivered(endpoint);
37
38
  endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000000, multiplier: 1});
39
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
40
+ await reporting.rmsVoltage(endpoint);
41
+ await reporting.rmsCurrent(endpoint);
38
42
  },
39
43
  },
40
44
  {
@@ -26,7 +26,7 @@ module.exports = [
26
26
  exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
27
27
  },
28
28
  {
29
- zigbeeModel: ['sbordckq'],
29
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_sbordckq'}],
30
30
  model: 'SM-1CTW-EU',
31
31
  vendor: 'Somgoms',
32
32
  description: 'Curtain switch',
package/devices/sonoff.js CHANGED
@@ -164,4 +164,16 @@ module.exports = [
164
164
  description: 'Zigbee smart plug',
165
165
  extend: extend.switch(),
166
166
  },
167
+ {
168
+ zigbeeModel: ['S40LITE'],
169
+ model: 'S40ZBTPB',
170
+ vendor: 'SONOFF',
171
+ description: '15A Zigbee smart plug',
172
+ extend: extend.switch(),
173
+ fromZigbee: [fz.on_off_skip_duplicate_transaction],
174
+ configure: async (device, coordinatorEndpoint, logger) => {
175
+ const endpoint = device.getEndpoint(1);
176
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
177
+ },
178
+ },
167
179
  ];
@@ -281,7 +281,8 @@ module.exports = [
281
281
  },
282
282
  },
283
283
  {
284
- fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000010.....$/}],
284
+ fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000010.....$/},
285
+ {modelID: 'GreenPower_2', ieeeAddr: /^0x0000000001b.....$/}],
285
286
  model: 'SR-ZGP2801K2-DIM',
286
287
  vendor: 'Sunricher',
287
288
  description: 'Pushbutton transmitter module',
@@ -73,7 +73,6 @@ module.exports = [
73
73
  description: 'Wireless motion sensor',
74
74
  fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
75
75
  toZigbee: [],
76
- meta: {battery: {dontDividePercentage: true}},
77
76
  exposes: [e.occupancy(), e.battery_low(), e.battery(), e.battery_voltage()],
78
77
  configure: async (device, coordinatorEndpoint, logger) => {
79
78
  device.powerSource = 'Battery';
package/devices/tuya.js CHANGED
@@ -14,7 +14,7 @@ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak',
14
14
  '_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
15
15
  '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
16
16
  '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit',
17
- '_TZ3000_cjrngdr3', '_TZ3000_zloso4jk', '_TZ3000_v4mevirn'];
17
+ '_TZ3000_cjrngdr3', '_TZ3000_zloso4jk', '_TZ3000_r6buo8ba'];
18
18
 
19
19
  const tzLocal = {
20
20
  TS0504B_color: {
@@ -43,6 +43,73 @@ const tzLocal = {
43
43
  }
44
44
  },
45
45
  },
46
+ zb_sm_cover: {
47
+ key: ['state', 'position', 'reverse_direction', 'top_limit', 'bottom_limit', 'favorite_position', 'goto_positon', 'report'],
48
+ convertSet: async (entity, key, value, meta) => {
49
+ switch (key) {
50
+ case 'position': {
51
+ const invert = (meta.state) ? !meta.state.invert_cover : false;
52
+ value = invert ? 100 - value : value;
53
+ if (value >= 0 && value <= 100) {
54
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.coverPosition, value);
55
+ } else {
56
+ throw new Error('TuYa_cover_control: Curtain motor position is out of range');
57
+ }
58
+ break;
59
+ }
60
+ case 'state': {
61
+ const stateEnums = tuya.getCoverStateEnums(meta.device.manufacturerName);
62
+ meta.logger.debug(`TuYa_cover_control: Using state enums for ${meta.device.manufacturerName}:
63
+ ${JSON.stringify(stateEnums)}`);
64
+
65
+ value = value.toLowerCase();
66
+ switch (value) {
67
+ case 'close':
68
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.state, stateEnums.close);
69
+ break;
70
+ case 'open':
71
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.state, stateEnums.open);
72
+ break;
73
+ case 'stop':
74
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.state, stateEnums.stop);
75
+ break;
76
+ default:
77
+ throw new Error('TuYa_cover_control: Invalid command received');
78
+ }
79
+ break;
80
+ }
81
+ case 'reverse_direction': {
82
+ meta.logger.info(`Motor direction ${(value) ? 'reverse' : 'forward'}`);
83
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.motorDirection, (value) ? 1 : 0);
84
+ break;
85
+ }
86
+ case 'top_limit': {
87
+ await tuya.sendDataPointEnum(entity, 104, {'SET': 0, 'CLEAR': 1}[value]);
88
+ break;
89
+ }
90
+ case 'bottom_limit': {
91
+ await tuya.sendDataPointEnum(entity, 103, {'SET': 0, 'CLEAR': 1}[value]);
92
+ break;
93
+ }
94
+ case 'favorite_position': {
95
+ await tuya.sendDataPointValue(entity, 115, value);
96
+ break;
97
+ }
98
+ case 'goto_positon': {
99
+ if (value == 'FAVORITE') {
100
+ value = (meta.state) ? meta.state.favorite_position : null;
101
+ } else {
102
+ value = parseInt(value);
103
+ }
104
+ return tz.tuya_cover_control.convertSet(entity, 'position', value, meta);
105
+ }
106
+ case 'report': {
107
+ await tuya.sendDataPointBool(entity, 116, 0);
108
+ break;
109
+ }
110
+ }
111
+ },
112
+ },
46
113
  };
47
114
 
48
115
  const fzLocal = {
@@ -99,6 +166,71 @@ const fzLocal = {
99
166
  }
100
167
  },
101
168
  },
169
+ zb_sm_cover: {
170
+ cluster: 'manuSpecificTuya',
171
+ type: ['commandDataReport', 'commandDataResponse'],
172
+ convert: (model, msg, publish, options, meta) => {
173
+ const result = {};
174
+ for (const dpValue of msg.data.dpValues) {
175
+ const dp = dpValue.dp;
176
+ const value = tuya.getDataValue(dpValue);
177
+
178
+ switch (dp) {
179
+ case tuya.dataPoints.coverPosition: // Started moving to position (triggered from Zigbee)
180
+ case tuya.dataPoints.coverArrived: { // Arrived at position
181
+ const invert = (meta.state) ? !meta.state.invert_cover : false;
182
+ const position = invert ? 100 - (value & 0xFF) : (value & 0xFF);
183
+ if (position > 0 && position <= 100) {
184
+ result.position = position;
185
+ result.state = 'OPEN';
186
+ } else if (position == 0) { // Report fully closed
187
+ result.position = position;
188
+ result.state = 'CLOSE';
189
+ }
190
+ break;
191
+ }
192
+ case 1: // report state
193
+ result.state = {0: 'OPEN', 1: 'STOP', 2: 'CLOSE'}[value];
194
+ break;
195
+ case tuya.dataPoints.motorDirection: // reverse direction
196
+ result.reverse_direction = (value == 1);
197
+ break;
198
+ case 10: // cycle time
199
+ result.cycle_time = value;
200
+ break;
201
+ case 101: // model
202
+ result.motor_type = {0: '', 1: 'AM0/6-28R-Sm', 2: 'AM0/10-19R-Sm',
203
+ 3: 'AM1/10-13R-Sm', 4: 'AM1/20-13R-Sm', 5: 'AM1/30-13R-Sm'}[value];
204
+ break;
205
+ case 102: // cycles
206
+ result.cycle_count = value;
207
+ break;
208
+ case 103: // set or clear bottom limit
209
+ result.bottom_limit = {0: 'SET', 1: 'CLEAR'}[value];
210
+ break;
211
+ case 104: // set or clear top limit
212
+ result.top_limit = {0: 'SET', 1: 'CLEAR'}[value];
213
+ break;
214
+ case 109: // active power
215
+ result.active_power = value;
216
+ break;
217
+ case 115: // favorite_position
218
+ result.favorite_position = (value != 101) ? value : null;
219
+ break;
220
+ case 116: // report confirmation
221
+ break;
222
+ case 121: // running state
223
+ result.running_state = {0: 'OPENING', 1: 'STOPPED', 2: 'CLOSING'}[value];
224
+ result.running = (value !== 1) ? true : false;
225
+ break;
226
+ default: // Unknown code
227
+ meta.logger.warn(`zb_sm_tuya_cover: Unhandled DP #${dp} for ${meta.device.manufacturerName}:
228
+ ${JSON.stringify(dpValue)}`);
229
+ }
230
+ }
231
+ return result;
232
+ },
233
+ },
102
234
  };
103
235
 
104
236
  module.exports = [
@@ -1128,7 +1260,6 @@ module.exports = [
1128
1260
  // Tubular motors:
1129
1261
  {modelID: 'TS0601', manufacturerName: '_TZE200_5sbebbzs'},
1130
1262
  {modelID: 'TS0601', manufacturerName: '_TZE200_zuz7f94z'},
1131
- {modelID: 'TS0601', manufacturerName: '_TZE200_zyrdrmno'},
1132
1263
  {modelID: 'TS0601', manufacturerName: '_TZE200_68nvbio9'},
1133
1264
  ],
1134
1265
  model: 'TS0601_cover',
@@ -2426,4 +2557,28 @@ module.exports = [
2426
2557
  await reporting.batteryPercentageRemaining(endpoint);
2427
2558
  },
2428
2559
  },
2560
+ {
2561
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_zyrdrmno'}],
2562
+ model: 'ZB-Sm',
2563
+ vendor: 'TuYa',
2564
+ description: 'Tubular motor',
2565
+ fromZigbee: [fzLocal.zb_sm_cover, fz.ignore_basic_report],
2566
+ toZigbee: [tzLocal.zb_sm_cover],
2567
+ onEvent: tuya.onEventSetTime,
2568
+ exposes: [
2569
+ e.cover_position().setAccess('position', ea.STATE_SET),
2570
+ exposes.enum('goto_positon', ea.SET, ['25', '50', '75', 'FAVORITE']),
2571
+ exposes.enum('running_state', ea.STATE, ['OPENING', 'CLOSING', 'STOPPED']),
2572
+ exposes.numeric('active_power', ea.STATE).withDescription('Active power').withUnit('mWt'),
2573
+ exposes.numeric('cycle_count', ea.STATE).withDescription('Cycle count'),
2574
+ exposes.numeric('cycle_time', ea.STATE).withDescription('Cycle time').withUnit('ms'),
2575
+ exposes.enum('top_limit', ea.STATE_SET, ['SET', 'CLEAR']).withDescription('Setup or clear top limit'),
2576
+ exposes.enum('bottom_limit', ea.STATE_SET, ['SET', 'CLEAR']).withDescription('Setup or clear bottom limit'),
2577
+ exposes.numeric('favorite_position', ea.STATE_SET).withValueMin(0).withValueMax(100)
2578
+ .withDescription('Favorite position of this cover'),
2579
+ exposes.binary(`reverse_direction`, ea.STATE_SET, true, false).withDescription(`Inverts the cover direction`),
2580
+ exposes.text('motor_type', ea.STATE),
2581
+ exposes.enum('report', ea.SET, ['REPORT']),
2582
+ ],
2583
+ },
2429
2584
  ];
@@ -130,7 +130,7 @@ module.exports = [
130
130
  'button_6_hold', 'button_6_single', 'button_6_double'])],
131
131
  },
132
132
  {
133
- fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_zigisuyh'}],
133
+ fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_zigisuyh'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_v4mevirn'}],
134
134
  model: 'ZIGBEE-B09-UK',
135
135
  vendor: 'Zemismart',
136
136
  description: 'Zigbee smart outlet universal socket with USB port',
@@ -189,4 +189,33 @@ module.exports = [
189
189
  toZigbee: [tz.tuya_cover_control, tz.tuya_cover_options, tz.tuya_data_point_test],
190
190
  exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
191
191
  },
192
+ {
193
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_9mahtqtg'}],
194
+ model: 'TB26-6',
195
+ vendor: 'Zemismart',
196
+ description: '6-gang smart wall switch',
197
+ exposes: [e.switch().withEndpoint('l1').setAccess('state', ea.STATE_SET),
198
+ e.switch().withEndpoint('l2').setAccess('state', ea.STATE_SET),
199
+ e.switch().withEndpoint('l3').setAccess('state', ea.STATE_SET),
200
+ e.switch().withEndpoint('l4').setAccess('state', ea.STATE_SET),
201
+ e.switch().withEndpoint('l5').setAccess('state', ea.STATE_SET),
202
+ e.switch().withEndpoint('l6').setAccess('state', ea.STATE_SET)],
203
+ fromZigbee: [fz.ignore_basic_report, fz.tuya_switch],
204
+ toZigbee: [tz.tuya_switch_state],
205
+ meta: {multiEndpoint: true},
206
+ endpoint: (device) => {
207
+ return {'l1': 1, 'l2': 1, 'l3': 1, 'l4': 1, 'l5': 1, 'l6': 1};
208
+ },
209
+ configure: async (device, coordinatorEndpoint, logger) => {
210
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
211
+ if (device.getEndpoint(2)) await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
212
+ if (device.getEndpoint(3)) await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
213
+ if (device.getEndpoint(4)) await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
214
+ if (device.getEndpoint(5)) await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
215
+ if (device.getEndpoint(6)) await reporting.bind(device.getEndpoint(6), coordinatorEndpoint, ['genOnOff']);
216
+ // Reports itself as battery which is not correct: https://github.com/Koenkk/zigbee2mqtt/issues/6190
217
+ device.powerSource = 'Mains (single phase)';
218
+ device.save();
219
+ },
220
+ },
192
221
  ];
package/lib/constants.js CHANGED
@@ -105,7 +105,8 @@ const danfossAdaptionRunStatus= {
105
105
  };
106
106
 
107
107
  const danfossAdaptionRunControl = {
108
- 1: 'initate_adaptation',
108
+ 0: 'none',
109
+ 1: 'initiate_adaptation',
109
110
  2: 'cancel_adaptation',
110
111
  };
111
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.534",
3
+ "version": "14.0.537",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [