zigbee-herdsman-converters 15.0.59 → 15.0.61

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.
@@ -158,7 +158,7 @@ const converters = {
158
158
  const days = [];
159
159
  for (let i = 0; i < 8; i++) {
160
160
  if ((msg.data['dayofweek'] & 1<<i) > 0) {
161
- days.push(constants.dayOfWeek[i]);
161
+ days.push(constants.thermostatDayOfWeek[i]);
162
162
  }
163
163
  }
164
164
 
@@ -412,7 +412,7 @@ const converters = {
412
412
  cluster: 'pm25Measurement',
413
413
  type: ['attributeReport', 'readResponse'],
414
414
  convert: (model, msg, publish, options, meta) => {
415
- if (msg.data['measuredValue']) {
415
+ if (msg.data.hasOwnProperty('measuredValue')) {
416
416
  return {pm25: msg.data['measuredValue']};
417
417
  }
418
418
  },
@@ -2191,7 +2191,7 @@ const converters = {
2191
2191
  return {
2192
2192
  // Same as in hvacThermostat:getWeeklyScheduleRsp hvacThermostat:setWeeklySchedule cluster format
2193
2193
  weekly_schedule: {
2194
- days: [constants.dayOfWeek[dayOfWeek]],
2194
+ days: [constants.thermostatDayOfWeek[dayOfWeek]],
2195
2195
  transitions: dataToTransitions(value, maxTransitions, dataOffset),
2196
2196
  },
2197
2197
  };
@@ -3533,8 +3533,8 @@ const converters = {
3533
3533
  }
3534
3534
  if (msg.data.hasOwnProperty('danfossDayOfWeek')) {
3535
3535
  result[postfixWithEndpointName('day_of_week', msg, model, meta)] =
3536
- constants.dayOfWeek.hasOwnProperty(msg.data['danfossDayOfWeek']) ?
3537
- constants.dayOfWeek[msg.data['danfossDayOfWeek']] :
3536
+ constants.thermostatDayOfWeek.hasOwnProperty(msg.data['danfossDayOfWeek']) ?
3537
+ constants.thermostatDayOfWeek[msg.data['danfossDayOfWeek']] :
3538
3538
  msg.data['danfossDayOfWeek'];
3539
3539
  }
3540
3540
  if (msg.data.hasOwnProperty('danfossTriggerTime')) {
@@ -1227,13 +1227,49 @@ const converters = {
1227
1227
  mode: value.mode,
1228
1228
  transitions: value.transitions,
1229
1229
  };
1230
+
1231
+
1232
+ // map array of desired modes to bitmask
1233
+ if (typeof payload.dayofweek === 'string') payload.dayofweek = [payload.dayofweek];
1234
+ if (Array.isArray(payload.dayofweek)) {
1235
+ let mode = 0;
1236
+ for (let m of payload.mode) {
1237
+ // lookup mode bit
1238
+ m = utils.getKey(constants.thermostatScheduleMode, m.toLowerCase(), m, Number);
1239
+ mode |= (1 << m);
1240
+ }
1241
+ payload.mode = mode;
1242
+ }
1243
+
1244
+ // map array of days to desired dayofweek bitmask
1245
+ if (typeof payload.dayofweek === 'string') payload.dayofweek = [payload.dayofweek];
1246
+ if (Array.isArray(payload.dayofweek)) {
1247
+ let dayofweek = 0;
1248
+ for (let d of payload.dayofweek) {
1249
+ // lookup dayofweek bit
1250
+ d = utils.getKey(constants.thermostatDayOfWeek, d.toLowerCase(), d, Number);
1251
+ dayofweek |= (1 << d);
1252
+ }
1253
+ payload.dayofweek = dayofweek;
1254
+ }
1255
+
1230
1256
  for (const elem of payload['transitions']) {
1231
- if (typeof elem['heatSetpoint'] == 'number') {
1257
+ if (typeof elem['heatSetpoint'] === 'number') {
1232
1258
  elem['heatSetpoint'] = Math.round(elem['heatSetpoint'] * 100);
1233
1259
  }
1234
- if (typeof elem['coolSetpoint'] == 'number') {
1260
+ if (typeof elem['coolSetpoint'] === 'number') {
1235
1261
  elem['coolSetpoint'] = Math.round(elem['coolSetpoint'] * 100);
1236
1262
  }
1263
+
1264
+ // accept 24h time notation (e.g. 19:30)
1265
+ if (typeof elem['transitionTime'] === 'string') {
1266
+ const time = elem['transitionTime'].split(':');
1267
+ if ((time.length != 2) || isNaN(time[0]) || isNaN(time[1])) {
1268
+ meta.logger.warn(`weekly_schedule: expected 24h time notation (e.g. 19:30) but got '${elem['transitionTime']}'!`);
1269
+ } else {
1270
+ elem['transitionTime'] = ((parseInt(time[0]) * 60) + parseInt(time[1]));
1271
+ }
1272
+ }
1237
1273
  }
1238
1274
  await entity.command('hvacThermostat', 'setWeeklySchedule', payload, utils.getOptions(meta.mapped, entity));
1239
1275
  },
@@ -2904,7 +2940,7 @@ const converters = {
2904
2940
  danfoss_day_of_week: {
2905
2941
  key: ['day_of_week'],
2906
2942
  convertSet: async (entity, key, value, meta) => {
2907
- const payload = {'danfossDayOfWeek': utils.getKey(constants.dayOfWeek, value, undefined, Number)};
2943
+ const payload = {'danfossDayOfWeek': utils.getKey(constants.thermostatDayOfWeek, value, undefined, Number)};
2908
2944
  await entity.write('hvacThermostat', payload, manufacturerOptions.danfoss);
2909
2945
  return {readAfterWriteTime: 200, state: {'day_of_week': value}};
2910
2946
  },
@@ -135,22 +135,28 @@ const develco = {
135
135
  type: ['attributeReport', 'readResponse'],
136
136
  options: [exposes.options.precision('voc'), exposes.options.calibration('voc')],
137
137
  convert: (model, msg, publish, options, meta) => {
138
- const voc = parseFloat(msg.data['measuredValue']);
138
+ // from Sensirion_Gas_Sensors_SGP3x_TVOC_Concept.pdf
139
+ // "The mean molar mass of this mixture is 110 g/mol and hence,
140
+ // 1 ppb TVOC corresponds to 4.5 μg/m3."
141
+ const vocPpb = parseFloat(msg.data['measuredValue']);
142
+ const voc = vocPpb * 4.5;
139
143
  const vocProperty = utils.postfixWithEndpointName('voc', msg, model, meta);
140
144
 
145
+ // from aqszb-110-technical-manual-air-quality-sensor-04-08-20.pdf page 6, section 2.2 voc
146
+ // this contains a ppb to level mapping table.
141
147
  let airQuality;
142
148
  const airQualityProperty = utils.postfixWithEndpointName('air_quality', msg, model, meta);
143
- if (voc <= 65) {
149
+ if (vocPpb <= 65) {
144
150
  airQuality = 'excellent';
145
- } else if (voc <= 220) {
151
+ } else if (vocPpb <= 220) {
146
152
  airQuality = 'good';
147
- } else if (voc <= 660) {
153
+ } else if (vocPpb <= 660) {
148
154
  airQuality = 'moderate';
149
- } else if (voc <= 2200) {
155
+ } else if (vocPpb <= 2200) {
150
156
  airQuality = 'poor';
151
- } else if (voc <= 5500) {
157
+ } else if (vocPpb <= 5500) {
152
158
  airQuality = 'unhealthy';
153
- } else if (voc > 5500) {
159
+ } else if (vocPpb > 5500) {
154
160
  airQuality = 'out_of_range';
155
161
  } else {
156
162
  airQuality = 'unknown';
@@ -9,7 +9,7 @@ const e = exposes.presets;
9
9
 
10
10
  const gledoptoExtend = {
11
11
  light_onoff_brightness: (options={}) => ({
12
- ...extend.light_onoff_brightness(options),
12
+ ...extend.light_onoff_brightness({disablePowerOnBehavior: true, ...options}),
13
13
  toZigbee: utils.replaceInArray(
14
14
  extend.light_onoff_brightness(options).toZigbee,
15
15
  [tz.light_onoff_brightness],
@@ -17,7 +17,7 @@ const gledoptoExtend = {
17
17
  ),
18
18
  }),
19
19
  light_onoff_brightness_colortemp: (options={}) => ({
20
- ...extend.light_onoff_brightness_colortemp(options),
20
+ ...extend.light_onoff_brightness_colortemp({disablePowerOnBehavior: true, ...options}),
21
21
  toZigbee: utils.replaceInArray(
22
22
  extend.light_onoff_brightness_colortemp(options).toZigbee,
23
23
  [tz.light_onoff_brightness, tz.light_colortemp],
@@ -25,7 +25,7 @@ const gledoptoExtend = {
25
25
  ),
26
26
  }),
27
27
  light_onoff_brightness_color: (options={}) => ({
28
- ...extend.light_onoff_brightness_color({...options, supportsHS: true}),
28
+ ...extend.light_onoff_brightness_color({disablePowerOnBehavior: true, supportsHS: true, ...options}),
29
29
  toZigbee: utils.replaceInArray(
30
30
  extend.light_onoff_brightness_color(options).toZigbee,
31
31
  [tz.light_onoff_brightness, tz.light_color],
@@ -33,7 +33,7 @@ const gledoptoExtend = {
33
33
  ),
34
34
  }),
35
35
  light_onoff_brightness_colortemp_color: (options={}) => ({
36
- ...extend.light_onoff_brightness_colortemp_color({...options, supportsHS: true}),
36
+ ...extend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true, supportsHS: true, ...options}),
37
37
  toZigbee: utils.replaceInArray(
38
38
  extend.light_onoff_brightness_colortemp_color(options).toZigbee,
39
39
  [tz.light_onoff_brightness, tz.light_color_colortemp],
@@ -41,7 +41,7 @@ const gledoptoExtend = {
41
41
  ),
42
42
  }),
43
43
  switch: (options={}) => ({
44
- ...extend.switch(options),
44
+ ...extend.switch({disablePowerOnBehavior: true, ...options}),
45
45
  onEvent: async (type, data, device) => {
46
46
  // This device doesn't support reporting.
47
47
  // Therefore we read the on/off state every 5 seconds.
@@ -84,21 +84,21 @@ module.exports = [
84
84
  model: 'GL-H-001',
85
85
  vendor: 'Gledopto',
86
86
  description: 'Zigbee RF Hub',
87
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
87
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
88
88
  },
89
89
  {
90
90
  zigbeeModel: ['HOMA2023'],
91
91
  model: 'GD-CZ-006',
92
92
  vendor: 'Gledopto',
93
93
  description: 'Zigbee LED Controller WW/CW',
94
- extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
94
+ extend: gledoptoExtend.light_onoff_brightness(),
95
95
  },
96
96
  {
97
97
  zigbeeModel: ['GL-SD-001'],
98
98
  model: 'GL-SD-001',
99
99
  vendor: 'Gledopto',
100
100
  description: 'Zigbee triac AC dimmer',
101
- extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
101
+ extend: gledoptoExtend.light_onoff_brightness(),
102
102
  meta: {disableDefaultResponse: true},
103
103
  },
104
104
  {
@@ -112,14 +112,14 @@ module.exports = [
112
112
  model: 'GL-C-006',
113
113
  vendor: 'Gledopto',
114
114
  description: 'Zigbee LED Controller WW/CW',
115
- extend: gledoptoExtend.light_onoff_brightness_colortemp({disablePowerOnBehavior: true}),
115
+ extend: gledoptoExtend.light_onoff_brightness_colortemp(),
116
116
  },
117
117
  {
118
118
  zigbeeModel: ['GL-C-006S'],
119
119
  model: 'GL-C-006S',
120
120
  vendor: 'Gledopto',
121
121
  description: 'Zigbee LED Controller WW/CW (plus)',
122
- extend: gledoptoExtend.light_onoff_brightness_colortemp({disablePowerOnBehavior: true}),
122
+ extend: gledoptoExtend.light_onoff_brightness_colortemp(),
123
123
  },
124
124
  {
125
125
  zigbeeModel: ['GL-C-006P'],
@@ -159,7 +159,7 @@ module.exports = [
159
159
  meta: {disableDefaultResponse: (entity) => !!entity.getDevice().getEndpoint(12)},
160
160
  vendor: 'Gledopto',
161
161
  description: 'Zigbee LED Controller RGBW (1 ID)',
162
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
162
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
163
163
  },
164
164
  {
165
165
  fingerprint: [
@@ -177,7 +177,7 @@ module.exports = [
177
177
  model: 'GL-C-007-2ID', // 2 ID controls white and color separate
178
178
  vendor: 'Gledopto',
179
179
  description: 'Zigbee LED Controller RGBW (2 ID)',
180
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
180
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
181
181
  exposes: [e.light_brightness_colortemp_colorxy().withEndpoint('rgb'), e.light_brightness().withEndpoint('white')],
182
182
  endpoint: (device) => {
183
183
  if (device.getEndpoint(10) && device.getEndpoint(11) && device.getEndpoint(13)) {
@@ -194,7 +194,7 @@ module.exports = [
194
194
  model: 'GL-C-007S',
195
195
  vendor: 'Gledopto',
196
196
  description: 'Zigbee LED Controller RGBW (plus)',
197
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
197
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
198
198
  },
199
199
  {
200
200
  zigbeeModel: ['GL-C-007P'],
@@ -227,7 +227,7 @@ module.exports = [
227
227
  model: 'GL-C-008-2ID', // 2 ID controls color temperature and color separate
228
228
  vendor: 'Gledopto',
229
229
  description: 'Zigbee LED Controller RGB+CCT (2 ID)',
230
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
230
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
231
231
  exposes: [e.light_brightness_colorxy().withEndpoint('rgb'), e.light_brightness_colortemp().withEndpoint('cct')],
232
232
  // Only enable disableDefaultResponse for the second fingerprint:
233
233
  // https://github.com/Koenkk/zigbee-herdsman-converters/issues/1315#issuecomment-645331185
@@ -247,7 +247,7 @@ module.exports = [
247
247
  model: 'GL-C-008-1ID', // 1 ID controls color temperature and color separate
248
248
  vendor: 'Gledopto',
249
249
  description: 'Zigbee LED Controller RGB+CCT (1 ID)',
250
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
250
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
251
251
  meta: {disableDefaultResponse: true},
252
252
  },
253
253
  {
@@ -255,7 +255,7 @@ module.exports = [
255
255
  model: 'GL-C-008S',
256
256
  vendor: 'Gledopto',
257
257
  description: 'Zigbee LED Controller RGB+CCT (plus)',
258
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
258
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
259
259
  meta: {disableDefaultResponse: true},
260
260
  },
261
261
  {
@@ -295,7 +295,7 @@ module.exports = [
295
295
  model: 'GL-C-009',
296
296
  vendor: 'Gledopto',
297
297
  description: 'Zigbee LED Controller W',
298
- extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
298
+ extend: gledoptoExtend.light_onoff_brightness(),
299
299
  },
300
300
  {
301
301
  zigbeeModel: ['GL-C-009P'],
@@ -314,14 +314,14 @@ module.exports = [
314
314
  model: 'GL-C-009S',
315
315
  vendor: 'Gledopto',
316
316
  description: 'Zigbee LED Controller W (plus)',
317
- extend: gledoptoExtend.light_onoff_brightness({disablePowerOnBehavior: true}),
317
+ extend: gledoptoExtend.light_onoff_brightness(),
318
318
  },
319
319
  {
320
320
  zigbeeModel: ['GL-MC-001'],
321
321
  model: 'GL-MC-001',
322
322
  vendor: 'Gledopto',
323
323
  description: 'Zigbee USB Mini LED Controller RGB+CCT',
324
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
324
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
325
325
  meta: {disableDefaultResponse: true},
326
326
  },
327
327
  {
@@ -329,7 +329,7 @@ module.exports = [
329
329
  model: 'GL-B-002P',
330
330
  vendor: 'Gledopto',
331
331
  description: 'Zigbee smart filament LED bulb',
332
- extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
332
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
333
333
  },
334
334
  {
335
335
  zigbeeModel: ['GL-S-006P'],
@@ -337,7 +337,7 @@ module.exports = [
337
337
  vendor: 'Gledopto',
338
338
  ota: ota.zigbeeOTA,
339
339
  description: 'Zigbee GU10 LED lamp',
340
- extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
340
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
341
341
  },
342
342
  {
343
343
  zigbeeModel: ['GL-MC-001P'],
@@ -352,7 +352,7 @@ module.exports = [
352
352
  model: 'GL-S-003Z',
353
353
  vendor: 'Gledopto',
354
354
  description: 'Zigbee 5W GU10 Bulb RGBW',
355
- extend: gledoptoExtend.light_onoff_brightness_color({disablePowerOnBehavior: true}),
355
+ extend: gledoptoExtend.light_onoff_brightness_color(),
356
356
  endpoint: (device) => {
357
357
  // https://github.com/Koenkk/zigbee2mqtt/issues/5169
358
358
  if (device.getEndpoint(12)) return {default: 12};
@@ -365,23 +365,21 @@ module.exports = [
365
365
  model: 'GL-S-004Z',
366
366
  vendor: 'Gledopto',
367
367
  description: 'Zigbee 4W MR16 Bulb 30deg RGB+CCT',
368
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({
369
- disableColorTempStartup: false, colorTempRange: [155, 495], disablePowerOnBehavior: true,
370
- }),
368
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disableColorTempStartup: false, colorTempRange: [155, 495]}),
371
369
  },
372
370
  {
373
371
  zigbeeModel: ['GL-S-005Z'],
374
372
  model: 'GL-S-005Z',
375
373
  vendor: 'Gledopto',
376
374
  description: 'Zigbee 4W MR16 Bulb 120deg RGB+CCT',
377
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
375
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
378
376
  },
379
377
  {
380
378
  zigbeeModel: ['GL-S-004ZS'],
381
379
  model: 'GL-S-004ZS',
382
380
  vendor: 'Gledopto',
383
381
  description: 'Zigbee 4W MR16 Bulb RGB+CCT (plus)',
384
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
382
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
385
383
  },
386
384
  {
387
385
  zigbeeModel: ['GL-S-004P', 'GL-S-005P'],
@@ -396,14 +394,14 @@ module.exports = [
396
394
  model: 'GL-S-007Z',
397
395
  vendor: 'Gledopto',
398
396
  description: 'Zigbee 5W GU10 Bulb RGB+CCT',
399
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
397
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
400
398
  },
401
399
  {
402
400
  zigbeeModel: ['GL-S-007ZS'],
403
401
  model: 'GL-S-007ZS',
404
402
  vendor: 'Gledopto',
405
403
  description: 'Zigbee 4W GU10 Bulb RGB+CCT (plus)',
406
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
404
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
407
405
  },
408
406
  {
409
407
  zigbeeModel: ['GL-S-007P'],
@@ -418,21 +416,21 @@ module.exports = [
418
416
  model: 'GL-S-008Z',
419
417
  vendor: 'Gledopto',
420
418
  description: 'Zigbee 5W PAR16 Bulb RGB+CCT',
421
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
419
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
422
420
  },
423
421
  {
424
422
  zigbeeModel: ['GL-B-001Z'],
425
423
  model: 'GL-B-001Z',
426
424
  vendor: 'Gledopto',
427
425
  description: 'Zigbee 4W E12/E14 Bulb RGB+CCT',
428
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
426
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
429
427
  },
430
428
  {
431
429
  zigbeeModel: ['GL-B-001ZS'],
432
430
  model: 'GL-B-001ZS',
433
431
  vendor: 'Gledopto',
434
432
  description: 'Zigbee 4W E12/E14 Bulb RGB+CCT (plus)',
435
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
433
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
436
434
  },
437
435
  {
438
436
  zigbeeModel: ['GL-B-001P'],
@@ -447,14 +445,14 @@ module.exports = [
447
445
  model: 'GL-B-007Z',
448
446
  vendor: 'Gledopto',
449
447
  description: 'Zigbee 6W E26/E27 Bulb RGB+CCT',
450
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
448
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
451
449
  },
452
450
  {
453
451
  zigbeeModel: ['GL-B-007ZS'],
454
452
  model: 'GL-B-007ZS',
455
453
  vendor: 'Gledopto',
456
454
  description: 'Zigbee 6W E26/E27 Bulb RGB+CCT (plus)',
457
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
455
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
458
456
  },
459
457
  {
460
458
  zigbeeModel: ['GL-B-007P'],
@@ -469,14 +467,14 @@ module.exports = [
469
467
  model: 'GL-B-008Z',
470
468
  vendor: 'Gledopto',
471
469
  description: 'Zigbee 12W E26/E27 Bulb RGB+CCT',
472
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
470
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
473
471
  },
474
472
  {
475
473
  zigbeeModel: ['GL-B-008ZS'],
476
474
  model: 'GL-B-008ZS',
477
475
  vendor: 'Gledopto',
478
476
  description: 'Zigbee 12W E26/E27 Bulb RGB+CCT (plus)',
479
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
477
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
480
478
  },
481
479
  {
482
480
  zigbeeModel: ['GL-B-008P'],
@@ -499,14 +497,14 @@ module.exports = [
499
497
  model: 'GL-D-003Z',
500
498
  vendor: 'Gledopto',
501
499
  description: 'Zigbee 6W Downlight RGB+CCT',
502
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
500
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
503
501
  },
504
502
  {
505
503
  zigbeeModel: ['GL-D-003ZS'],
506
504
  model: 'GL-D-003ZS',
507
505
  vendor: 'Gledopto',
508
506
  description: 'Zigbee 6W Downlight RGB+CCT (plus)',
509
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
507
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
510
508
  },
511
509
  {
512
510
  zigbeeModel: ['GL-D-003P'],
@@ -521,14 +519,14 @@ module.exports = [
521
519
  model: 'GL-D-004Z',
522
520
  vendor: 'Gledopto',
523
521
  description: 'Zigbee 9W Downlight RGB+CCT',
524
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
522
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
525
523
  },
526
524
  {
527
525
  zigbeeModel: ['GL-D-004ZS'],
528
526
  model: 'GL-D-004ZS',
529
527
  vendor: 'Gledopto',
530
528
  description: 'Zigbee 9W Downlight RGB+CCT (plus)',
531
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
529
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
532
530
  },
533
531
  {
534
532
  zigbeeModel: ['GL-D-004P'],
@@ -543,14 +541,14 @@ module.exports = [
543
541
  model: 'GL-D-005Z',
544
542
  vendor: 'Gledopto',
545
543
  description: 'Zigbee 12W Downlight RGB+CCT',
546
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
544
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
547
545
  },
548
546
  {
549
547
  zigbeeModel: ['GL-D-005ZS'],
550
548
  model: 'GL-D-005ZS',
551
549
  vendor: 'Gledopto',
552
550
  description: 'Zigbee 12W Downlight RGB+CCT (plus)',
553
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
551
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
554
552
  },
555
553
  {
556
554
  zigbeeModel: ['GL-D-005P'],
@@ -580,21 +578,21 @@ module.exports = [
580
578
  model: 'GL-FL-004TZ',
581
579
  vendor: 'Gledopto',
582
580
  description: 'Zigbee 10W Floodlight RGB+CCT',
583
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
581
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
584
582
  },
585
583
  {
586
584
  zigbeeModel: ['GL-B-003P'],
587
585
  model: 'GL-B-003P',
588
586
  vendor: 'Gledopto',
589
587
  description: 'Zigbee 7W E26/E27 Bulb RGB+CCT (pro)',
590
- extend: extend.light_onoff_brightness_colortemp({colorTempRange: [155, 495]}),
588
+ extend: gledoptoExtend.light_onoff_brightness_colortemp({colorTempRange: [155, 495]}),
591
589
  },
592
590
  {
593
591
  zigbeeModel: ['GL-FL-004TZS'],
594
592
  model: 'GL-FL-004TZS',
595
593
  vendor: 'Gledopto',
596
594
  description: 'Zigbee 10W Floodlight RGB+CCT (plus)',
597
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [155, 495], disablePowerOnBehavior: true}),
595
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [155, 495]}),
598
596
  },
599
597
  {
600
598
  zigbeeModel: ['GL-FL-004P', 'GL-FL-004TZP'],
@@ -632,14 +630,14 @@ module.exports = [
632
630
  model: 'GL-FL-005TZ',
633
631
  vendor: 'Gledopto',
634
632
  description: 'Zigbee 30W Floodlight RGB+CCT',
635
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
633
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
636
634
  },
637
635
  {
638
636
  zigbeeModel: ['GL-FL-005TZS'],
639
637
  model: 'GL-FL-005TZS',
640
638
  vendor: 'Gledopto',
641
639
  description: 'Zigbee 30W Floodlight RGB+CCT (plus)',
642
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
640
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
643
641
  },
644
642
  {
645
643
  zigbeeModel: ['GL-FL-005P', 'GL-FL-005TZP'],
@@ -654,14 +652,14 @@ module.exports = [
654
652
  model: 'GL-FL-006TZ',
655
653
  vendor: 'Gledopto',
656
654
  description: 'Zigbee 60W Floodlight RGB+CCT',
657
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
655
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
658
656
  },
659
657
  {
660
658
  zigbeeModel: ['GL-FL-006TZS'],
661
659
  model: 'GL-FL-006TZS',
662
660
  vendor: 'Gledopto',
663
661
  description: 'Zigbee 60W Floodlight RGB+CCT (plus)',
664
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
662
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
665
663
  },
666
664
  {
667
665
  zigbeeModel: ['GL-FL-006P', 'GL-FL-006TZP'],
@@ -676,14 +674,14 @@ module.exports = [
676
674
  model: 'GL-G-001Z',
677
675
  vendor: 'Gledopto',
678
676
  description: 'Zigbee 12W Garden Lamp RGB+CCT',
679
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
677
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
680
678
  },
681
679
  {
682
680
  zigbeeModel: ['GL-G-001ZS'],
683
681
  model: 'GL-G-001ZS',
684
682
  vendor: 'Gledopto',
685
683
  description: 'Zigbee 12W Garden Lamp RGB+CCT (plus)',
686
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
684
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
687
685
  },
688
686
  {
689
687
  zigbeeModel: ['GL-G-001P'],
@@ -714,27 +712,27 @@ module.exports = [
714
712
  model: 'GL-G-007Z',
715
713
  vendor: 'Gledopto',
716
714
  description: 'Zigbee 9W garden lamp RGB+CCT',
717
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disablePowerOnBehavior: true}),
715
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
718
716
  },
719
717
  {
720
718
  zigbeeModel: ['GL-W-001Z'],
721
719
  model: 'GL-W-001Z',
722
720
  vendor: 'Gledopto',
723
721
  description: 'Zigbee on/off wall switch',
724
- extend: gledoptoExtend.switch({disablePowerOnBehavior: true}),
722
+ extend: gledoptoExtend.switch(),
725
723
  },
726
724
  {
727
725
  zigbeeModel: ['GL-SD-002'],
728
726
  model: 'GL-SD-002',
729
727
  vendor: 'Gledopto',
730
728
  description: 'Zigbee 3.0 smart home switch',
731
- extend: gledoptoExtend.switch({disablePowerOnBehavior: true}),
729
+ extend: gledoptoExtend.switch(),
732
730
  },
733
731
  {
734
732
  zigbeeModel: ['GL-B-004P'],
735
733
  model: 'GL-B-004P',
736
734
  vendor: 'Gledopto',
737
735
  description: 'Filament LED light bulb E27 G95 7W pro',
738
- extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
736
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
739
737
  },
740
738
  ];
package/devices/ikea.js CHANGED
@@ -181,6 +181,15 @@ const ikea = {
181
181
  return state;
182
182
  },
183
183
  },
184
+ ikea_voc_index: {
185
+ cluster: 'msIkeaVocIndexMeasurement',
186
+ type: ['attributeReport', 'readResponse'],
187
+ convert: (model, msg, publish, options, meta) => {
188
+ if (msg.data.hasOwnProperty('measuredValue')) {
189
+ return {voc_index: msg.data['measuredValue']};
190
+ }
191
+ },
192
+ },
184
193
  battery: {
185
194
  cluster: 'genPowerCfg',
186
195
  type: ['attributeReport', 'readResponse'],
@@ -428,10 +437,10 @@ module.exports = [
428
437
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
429
438
  },
430
439
  {
431
- zigbeeModel: ['TRADFRI bulb E14 WS globe 470lm'],
440
+ zigbeeModel: ['TRADFRI bulb E14 WS globe 470lm', 'TRADFRI bulb E12 WS globe 450lm'],
432
441
  model: 'LED2101G4',
433
442
  vendor: 'IKEA',
434
- description: 'TRADFRI bulb E14 WS globe 470lm, dimmable, white spectrum, opal white',
443
+ description: 'TRADFRI bulb E12/E14 WS globe 450/470 lumen, dimmable, white spectrum, opal white',
435
444
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
436
445
  },
437
446
  {
@@ -565,6 +574,7 @@ module.exports = [
565
574
  vendor: 'IKEA',
566
575
  description: 'TRADFRI driver for wireless control (10 watt)',
567
576
  extend: tradfriExtend.light_onoff_brightness(),
577
+ meta: {turnsOffAtBrightness1: true},
568
578
  },
569
579
  {
570
580
  zigbeeModel: ['TRADFRI transformer 30W', 'TRADFRI Driver 30W'],
@@ -572,6 +582,7 @@ module.exports = [
572
582
  vendor: 'IKEA',
573
583
  description: 'TRADFRI driver for wireless control (30 watt)',
574
584
  extend: tradfriExtend.light_onoff_brightness(),
585
+ meta: {turnsOffAtBrightness1: true},
575
586
  },
576
587
  {
577
588
  zigbeeModel: ['SILVERGLANS IP44 LED driver'],
@@ -1030,13 +1041,13 @@ module.exports = [
1030
1041
  model: 'E2112',
1031
1042
  vendor: 'IKEA',
1032
1043
  description: 'Vindstyrka air quality and humidity sensor',
1033
- fromZigbee: [fz.temperature, fz.humidity, fz.pm25],
1044
+ fromZigbee: [fz.temperature, fz.humidity, fz.pm25, ikea.fz.ikea_voc_index],
1034
1045
  toZigbee: [],
1035
- exposes: [e.temperature(), e.humidity(), e.pm25()],
1046
+ exposes: [e.temperature(), e.humidity(), e.pm25(), e.voc_index().withDescription('Sensirion VOC index')],
1036
1047
  configure: async (device, coordinatorEndpoint, logger) => {
1037
1048
  const ep = device.getEndpoint(1);
1038
1049
  await reporting.bind(ep, coordinatorEndpoint,
1039
- ['msTemperatureMeasurement', 'msRelativeHumidity', 'pm25Measurement']);
1050
+ ['msTemperatureMeasurement', 'msRelativeHumidity', 'pm25Measurement', 'msIkeaVocIndexMeasurement']);
1040
1051
  await ep.configureReporting('msTemperatureMeasurement', [{
1041
1052
  attribute: 'measuredValue',
1042
1053
  minimumReportInterval: 60, maximumReportInterval: 120,
@@ -1049,6 +1060,10 @@ module.exports = [
1049
1060
  attribute: 'measuredValueIkea',
1050
1061
  minimumReportInterval: 60, maximumReportInterval: 120, reportableChange: 2,
1051
1062
  }]);
1063
+ await ep.configureReporting('msIkeaVocIndexMeasurement', [{
1064
+ attribute: 'measuredValue',
1065
+ minimumReportInterval: 60, maximumReportInterval: 120,
1066
+ }]);
1052
1067
  },
1053
1068
  },
1054
1069
  ];
package/devices/konke.js CHANGED
@@ -3,6 +3,22 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
3
3
  const reporting = require('../lib/reporting');
4
4
  const e = exposes.presets;
5
5
 
6
+ const fzLocal = {
7
+ command_recall_konke: {
8
+ cluster: 'genScenes',
9
+ type: 'commandRecall',
10
+ convert: (model, msg, publish, options, meta) => {
11
+ const payload = {
12
+ 241: 'hexagon',
13
+ 242: 'square',
14
+ 243: 'triangle',
15
+ 244: 'circle',
16
+ };
17
+ return {action: payload[msg.data.sceneid]};
18
+ },
19
+ },
20
+ };
21
+
6
22
  module.exports = [
7
23
  {
8
24
  zigbeeModel: ['3AFE170100510001', '3AFE280100510001'],
@@ -77,12 +93,49 @@ module.exports = [
77
93
  exposes: [e.water_leak(), e.battery_low(), e.tamper()],
78
94
  },
79
95
  {
80
- fingerprint: [{modelID: 'TS0222', manufacturerName: '_TYZB01_fi5yftwv'}],
96
+ fingerprint: [{modelID: 'TS0222', manufacturerName: '_TYZB01_fi5yftwv'}, {modelID: '3AFE090103021000'}],
81
97
  model: 'KK-ES-J01W',
82
98
  vendor: 'Konke',
83
- description: 'Room temperature, relative humidity and illuminance sensor',
99
+ description: 'Temperature, relative humidity and illuminance sensor',
84
100
  fromZigbee: [fz.battery, fz.illuminance, fz.humidity, fz.temperature],
85
101
  toZigbee: [],
86
- exposes: [e.battery(), e.illuminance(), e.illuminance_lux().withUnit('lx'), e.humidity(), e.temperature()],
102
+ exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux().withUnit('lx'), e.humidity(), e.temperature()],
103
+ },
104
+ {
105
+ zigbeeModel: ['3AFE241000040002'],
106
+ model: 'KK-TQ-J01W',
107
+ vendor: 'Konke',
108
+ description: 'Smart 4 key scene switch',
109
+ fromZigbee: [fzLocal.command_recall_konke, fz.battery],
110
+ toZigbee: [],
111
+ meta: {battery: {voltageToPercentage: '3V_2500'}},
112
+ exposes: [e.battery(), e.battery_voltage(), e.battery_low(), e.action(['hexagon', 'square', 'triangle', 'circle'])],
113
+ },
114
+ {
115
+ zigbeeModel: ['3AFE07010402100D', '3AFE08010402100D'],
116
+ model: 'KK-BS-J01W',
117
+ vendor: 'Konke',
118
+ description: 'Occupancy sensor',
119
+ fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery],
120
+ toZigbee: [],
121
+ exposes: [e.occupancy(), e.battery_voltage(), e.battery_low(), e.tamper(), e.battery()],
122
+ },
123
+ {
124
+ zigbeeModel: ['3AFE21100402102A'],
125
+ model: 'KK-WA-J01W',
126
+ vendor: 'Konke',
127
+ description: 'Water detector',
128
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
129
+ toZigbee: [],
130
+ exposes: [e.water_leak(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
131
+ },
132
+ {
133
+ zigbeeModel: ['3AFE221004021015'],
134
+ model: 'KK-DS-J01W',
135
+ vendor: 'Konke',
136
+ description: 'Contact sensor',
137
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
138
+ toZigbee: [],
139
+ exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
87
140
  },
88
141
  ];
@@ -87,6 +87,6 @@ module.exports = [
87
87
  fromZigbee: [fz.lifecontrolVoc, fz.battery],
88
88
  toZigbee: [],
89
89
  meta: {battery: {dontDividePercentage: true}},
90
- exposes: [e.temperature(), e.humidity(), e.voc(), e.eco2(), e.battery()],
90
+ exposes: [e.temperature(), e.humidity(), e.voc().withUnit('ppb'), e.eco2(), e.battery()],
91
91
  },
92
92
  ];
package/devices/osram.js CHANGED
@@ -412,7 +412,7 @@ module.exports = [
412
412
  model: '4062172044776_1',
413
413
  vendor: 'OSRAM',
414
414
  description: 'Zigbee 3.0 DALI CONV LI dimmer for DALI-based luminaires (only one device)',
415
- extend: extend.ledvance.light_onoff_brightness(),
415
+ extend: extend.ledvance.light_onoff_brightness({disablePowerOnBehavior: true}),
416
416
  ota: ota.zigbeeOTA,
417
417
  },
418
418
  {
@@ -425,7 +425,7 @@ module.exports = [
425
425
  fz.command_toggle, fz.command_move, fz.command_stop],
426
426
  extend: extend.ledvance.light_onoff_brightness({noConfigure: true}),
427
427
  exposes: [e.action(['toggle', 'brightness_move_up', 'brightness_move_down', 'brightness_stop']),
428
- ...extend.ledvance.light_onoff_brightness({noConfigure: true}).exposes],
428
+ ...extend.ledvance.light_onoff_brightness({noConfigure: true, disablePowerOnBehavior: true}).exposes],
429
429
  ota: ota.zigbeeOTA,
430
430
  configure: async (device, coordinatorEndpoint, logger) => {
431
431
  await reporting.bind(device.getEndpoint(10), coordinatorEndpoint, ['genLevelCtrl', 'genOnOff']);
@@ -599,7 +599,7 @@ module.exports = [
599
599
  extend: philips.extend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
600
600
  },
601
601
  {
602
- zigbeeModel: ['LCG002', '929003047701', '929003047701', '929003526202_01', ' 929003526202_02', '929003526202_03'],
602
+ zigbeeModel: ['LCG002', '929003047701', '929003047701', '929003526202_01', '929003526202_02', '929003526202_03'],
603
603
  model: '929001953101',
604
604
  vendor: 'Philips',
605
605
  description: 'Hue White and Color Ambiance GU10',
@@ -108,19 +108,19 @@ module.exports = [
108
108
  zigbeeModel: [
109
109
  'SS909ZB',
110
110
  'PS600',
111
- 'PS600\u0000\u0000 �\u0001 ��\u0000\u0000\t\u0001@\u0011�u\u0000\u0000\u0018&\n\u0005\u0000B',
112
- 'PS600\u0000\u0000 �\u0001 ��\u0000\u0000\t\u0001@\u0011�u\u0000\u0000\u0018\u0006\n\u0005\u0000',
113
- 'PS600\u0000\u0000 �\u0001 ��\u0000\u0000\t\u0001@\u0011�u\u0000\u0000\u0018\u0006\n\u0005\u0000B',
114
111
  ],
115
112
  model: 'PS600',
116
113
  vendor: 'Salus Controls',
117
114
  description: 'Pipe temperature sensor',
118
- fromZigbee: [fz.temperature],
115
+ fromZigbee: [fz.temperature, fz.battery],
119
116
  toZigbee: [],
120
- exposes: [e.temperature()],
117
+ meta: {battery: {voltageToPercentage: '3V_2500'}},
118
+ exposes: [e.battery(), e.temperature()],
121
119
  configure: async (device, coordinatorEndpoint, logger) => {
122
120
  const endpoint = device.getEndpoint(9);
123
- await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement']);
121
+ await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
122
+ await reporting.temperature(endpoint);
123
+ await reporting.batteryVoltage(endpoint);
124
124
  },
125
125
  ota: ota.salus,
126
126
  },
@@ -64,7 +64,7 @@ module.exports = [
64
64
  tz.stelpro_thermostat_outdoor_temperature],
65
65
  exposes: [e.local_temperature(), e.keypad_lockout(),
66
66
  exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
67
- .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])],
67
+ .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withPiHeatingDemand()],
68
68
  configure: async (device, coordinatorEndpoint, logger) => {
69
69
  const endpoint = device.getEndpoint(25);
70
70
  const binds = ['genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg', 'msTemperatureMeasurement'];
package/devices/tuya.js CHANGED
@@ -1018,6 +1018,7 @@ module.exports = [
1018
1018
  {vendor: 'Lidl', model: '14153706L', description: 'Livarno smart LED ceiling light'},
1019
1019
  {vendor: 'Zemismart', model: 'LXZB-ZB-09A', description: 'Zemismart LED Surface Mounted Downlight 9W RGBW'},
1020
1020
  {vendor: 'Feconn', model: 'FE-GU10-5W', description: 'Zigbee GU10 5W smart bulb'},
1021
+ {vendor: 'Nedis', model: 'ZBLC1E14'},
1021
1022
  ],
1022
1023
  extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
1023
1024
  },
@@ -2183,9 +2184,9 @@ module.exports = [
2183
2184
  e.cover_position().setAccess('position', ea.STATE_SET),
2184
2185
  exposes.composite('options', 'options', ea.STATE_SET)
2185
2186
  .withFeature(exposes.numeric('motor_speed', ea.STATE_SET)
2186
- .withValueMin(0)
2187
- .withValueMax(255)
2188
- .withDescription('Motor speed'))],
2187
+ .withValueMin(0).withValueMax(255).withDescription('Motor speed'))
2188
+ .withFeature(exposes.binary('reverse_direction', ea.STATE_SET, true, false)
2189
+ .withDescription('Reverse the motor direction'))],
2189
2190
  },
2190
2191
  {
2191
2192
  fingerprint: [
@@ -2551,7 +2552,7 @@ module.exports = [
2551
2552
  },
2552
2553
  },
2553
2554
  ],
2554
- [1, 'system_mode', tuya.valueConverterBasic.lookup({'auto': tuya.enum(1), 'off': tuya.enum(2), 'on': tuya.enum(3)})],
2555
+ [1, 'system_mode', tuya.valueConverterBasic.lookup({'auto': tuya.enum(1), 'off': tuya.enum(2), 'heat': tuya.enum(3)})],
2555
2556
  [1, 'preset', tuya.valueConverterBasic.lookup(
2556
2557
  {'auto': tuya.enum(0), 'manual': tuya.enum(1), 'off': tuya.enum(2), 'on': tuya.enum(3)})],
2557
2558
  [2, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
@@ -2603,11 +2604,12 @@ module.exports = [
2603
2604
  });
2604
2605
  try {
2605
2606
  await reporting.currentSummDelivered(endpoint);
2606
- } catch (error) {/* fails for some https://github.com/Koenkk/zigbee2mqtt/issues/11179 */}
2607
+ await reporting.rmsVoltage(endpoint, {change: 5});
2608
+ await reporting.rmsCurrent(endpoint, {change: 50});
2609
+ await reporting.activePower(endpoint, {change: 10});
2610
+ } catch (error) {/* fails for some https://github.com/Koenkk/zigbee2mqtt/issues/11179
2611
+ and https://github.com/Koenkk/zigbee2mqtt/issues/16864 */}
2607
2612
  await endpoint.read('genOnOff', ['onOff', 'moesStartUpOnOff', 'tuyaBacklightMode']);
2608
- await reporting.rmsVoltage(endpoint, {change: 5});
2609
- await reporting.rmsCurrent(endpoint, {change: 50});
2610
- await reporting.activePower(endpoint, {change: 10});
2611
2613
  },
2612
2614
  options: [exposes.options.measurement_poll_interval()],
2613
2615
  // This device doesn't support reporting correctly.
@@ -3570,7 +3572,7 @@ module.exports = [
3570
3572
  tuyaDatapoints: [
3571
3573
  [1, 'presence', tuya.valueConverter.trueFalse1],
3572
3574
  [2, 'radar_sensitivity', tuya.valueConverter.raw],
3573
- [102, 'occupancy', tuya.valueConverter.trueFalse2],
3575
+ [102, 'occupancy', tuya.valueConverter.trueFalse1],
3574
3576
  [103, 'illuminance_lux', tuya.valueConverter.raw],
3575
3577
  [105, 'tumble_switch', tuya.valueConverter.plus1],
3576
3578
  [106, 'tumble_alarm_time', tuya.valueConverter.raw],
package/devices/xiaomi.js CHANGED
@@ -2769,7 +2769,7 @@ module.exports = [
2769
2769
  fromZigbee: [fz.xiaomi_tvoc, fz.battery, fz.temperature, fz.humidity, fz.aqara_opple],
2770
2770
  toZigbee: [tzLocal.VOCKQJK11LM_display_unit],
2771
2771
  meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2772
- exposes: [e.temperature(), e.humidity(), e.voc(), e.device_temperature(), e.battery(), e.battery_voltage(),
2772
+ exposes: [e.temperature(), e.humidity(), e.voc().withUnit('ppb'), e.device_temperature(), e.battery(), e.battery_voltage(),
2773
2773
  exposes.enum('display_unit', ea.ALL, ['mgm3_celsius', 'ppb_celsius', 'mgm3_fahrenheit', 'ppb_fahrenheit'])
2774
2774
  .withDescription('Units to show on the display')],
2775
2775
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -2908,6 +2908,7 @@ module.exports = [
2908
2908
  toZigbee: [],
2909
2909
  meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2910
2910
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
2911
+ ota: ota.zigbeeOTA,
2911
2912
  },
2912
2913
  {
2913
2914
  zigbeeModel: ['lumi.plug.sacn02'],
package/lib/constants.js CHANGED
@@ -45,7 +45,7 @@ const thermostatRunningMode= {
45
45
  4: 'heat',
46
46
  };
47
47
 
48
- const dayOfWeek = {
48
+ const thermostatDayOfWeek = {
49
49
  0: 'sunday',
50
50
  1: 'monday',
51
51
  2: 'tuesday',
@@ -83,6 +83,11 @@ const thermostatAcLouverPositions = {
83
83
  5: 'three_quarters_open',
84
84
  };
85
85
 
86
+ const thermostatScheduleMode = {
87
+ 0: 'heat',
88
+ 1: 'cool',
89
+ };
90
+
86
91
  const fanMode = {
87
92
  'off': 0,
88
93
  'low': 1,
@@ -284,7 +289,8 @@ module.exports = {
284
289
  thermostatRunningStates,
285
290
  thermostatRunningMode,
286
291
  thermostatAcLouverPositions,
287
- dayOfWeek,
292
+ thermostatScheduleMode,
293
+ thermostatDayOfWeek,
288
294
  fanMode,
289
295
  temperatureDisplayMode,
290
296
  danfossAdaptionRunControl,
package/lib/exposes.js CHANGED
@@ -642,7 +642,8 @@ module.exports = {
642
642
  valve_state: () => new Binary('valve_state', access.STATE, 'OPEN', 'CLOSED').withDescription('Valve state if open or closed'),
643
643
  valve_detection: () => new Switch().withState('valve_detection', true).setAccess('state', access.STATE_SET),
644
644
  vibration: () => new Binary('vibration', access.STATE, true, false).withDescription('Indicates whether the device detected vibration'),
645
- voc: () => new Numeric('voc', access.STATE).withUnit('ppb').withDescription('Measured VOC value'),
645
+ voc: () => new Numeric('voc', access.STATE).withUnit('µg/m³').withDescription('Measured VOC value'),
646
+ voc_index: () => new Numeric('voc_index', access.STATE).withDescription('VOC index'),
646
647
  voltage: () => new Numeric('voltage', access.STATE).withUnit('V').withDescription('Measured electrical potential value'),
647
648
  voltage_phase_b: () => new Numeric('voltage_phase_b', access.STATE).withUnit('V').withDescription('Measured electrical potential value on phase B'),
648
649
  voltage_phase_c: () => new Numeric('voltage_phase_c', access.STATE).withUnit('V').withDescription('Measured electrical potential value on phase C'),
package/lib/tuya.js CHANGED
@@ -342,7 +342,7 @@ function convertStringToHexArray(value) {
342
342
  // Use manufacturerName to identify device!
343
343
  // Dont' invert _TZE200_cowvfni3: https://github.com/Koenkk/zigbee2mqtt/issues/6043
344
344
  const coverPositionInvert = ['_TZE200_wmcdj3aq', '_TZE200_nogaemzt', '_TZE200_xuzcvlku', '_TZE200_xaabybja', '_TZE200_rmymn92d',
345
- '_TZE200_gubdgai2'];
345
+ '_TZE200_gubdgai2', '_TZE200_r0jdjrvi'];
346
346
 
347
347
  // Gets a boolean indicating whether the cover by this manufacturerName needs reversed positions
348
348
  function isCoverInverted(manufacturerName) {
@@ -1232,7 +1232,6 @@ const valueConverterBasic = {
1232
1232
  const valueConverter = {
1233
1233
  trueFalse0: valueConverterBasic.trueFalse(0),
1234
1234
  trueFalse1: valueConverterBasic.trueFalse(1),
1235
- trueFalse2: valueConverterBasic.trueFalse(2),
1236
1235
  trueFalseEnum0: valueConverterBasic.trueFalse(new Enum(0)),
1237
1236
  onOff: valueConverterBasic.lookup({'ON': true, 'OFF': false}),
1238
1237
  powerOnBehavior: valueConverterBasic.lookup({'off': 0, 'on': 1, 'previous': 2}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "15.0.59",
3
+ "version": "15.0.61",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [