zigbee-herdsman-converters 14.0.611 → 14.0.612

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.
@@ -8022,7 +8022,7 @@ const converters = {
8022
8022
  const value = tuya.getDataValue(dpValue);
8023
8023
  switch (dpValue.dp) {
8024
8024
  case tuya.dataPoints.state:
8025
- result.contact = Boolean(value);
8025
+ result.contact = !value;
8026
8026
  break;
8027
8027
  case tuya.dataPoints.thitBatteryPercentage:
8028
8028
  result.battery = value;
@@ -859,6 +859,7 @@ const converters = {
859
859
  state = meta.message.state = brightness === 0 ? 'off' : 'on';
860
860
  }
861
861
 
862
+ let publishFakeOnLevel = false;
862
863
  let publishBrightness = brightness !== undefined;
863
864
  const targetState = state === 'toggle' ? (meta.state.state === 'ON' ? 'off' : 'on') : state;
864
865
  if (targetState === 'off') {
@@ -885,17 +886,27 @@ const converters = {
885
886
  // TODO: same problem as above.
886
887
  // TODO: if transition is not specified, should use device default (OnTransitionTime), not 0.
887
888
  if (transition.specified || globalStore.getValue(entity, 'turnedOffWithTransition') === true) {
888
- const current = utils.getObjectProperty(meta.state, 'brightness', 254);
889
- brightness = globalStore.getValue(entity, 'brightness', current);
890
- try {
891
- const attributeRead = await entity.read('genLevelCtrl', ['onLevel']);
892
- // TODO: for groups, `read` does not wait for responses. If it did, we could still issue a single
893
- // command if all values of `OnLevel` are equal, or split into one command per device if not.
894
- if (attributeRead !== undefined && attributeRead['onLevel'] != 255) {
895
- brightness = attributeRead['onLevel'];
889
+ const levelConfig = utils.getObjectProperty(meta.state, 'level_config', {});
890
+ let onLevel = utils.getObjectProperty(levelConfig, 'on_level', 0);
891
+ if (onLevel === 0) {
892
+ try {
893
+ const attributeRead = await entity.read('genLevelCtrl', ['onLevel']);
894
+ if (attributeRead !== undefined) {
895
+ onLevel = attributeRead['onLevel'];
896
+ }
897
+ } catch (e) {
898
+ // OnLevel not supported; write a 'previous' value to state to avoid re-reads
896
899
  }
897
- } catch (e) {
898
- // OnLevel not supported
900
+ }
901
+ if (onLevel === 0) {
902
+ onLevel = 'previous';
903
+ publishFakeOnLevel = true;
904
+ }
905
+ if (onLevel === 255 || onLevel === 'previous') {
906
+ const current = utils.getObjectProperty(meta.state, 'brightness', 254);
907
+ brightness = globalStore.getValue(entity, 'brightness', current);
908
+ } else {
909
+ brightness = onLevel;
899
910
  }
900
911
  // Published state might have gotten clobbered by reporting.
901
912
  publishBrightness = true;
@@ -933,6 +944,9 @@ const converters = {
933
944
  if (publishBrightness) {
934
945
  result.state.brightness = Number(brightness);
935
946
  }
947
+ if (publishFakeOnLevel) {
948
+ result.state.level_config = {on_level: 'previous'};
949
+ }
936
950
  if (state !== null) {
937
951
  result.state.state = brightness === 0 ? 'OFF' : 'ON';
938
952
  }
@@ -1510,6 +1524,12 @@ const converters = {
1510
1524
  await entity.read('msTemperatureMeasurement', ['measuredValue']);
1511
1525
  },
1512
1526
  },
1527
+ illuminance: {
1528
+ key: ['illuminance', 'illuminance_lux'],
1529
+ convertGet: async (entity, key, meta) => {
1530
+ await entity.read('msIlluminanceMeasurement', ['measuredValue']);
1531
+ },
1532
+ },
1513
1533
  // #endregion
1514
1534
 
1515
1535
  // #region Non-generic converters
@@ -0,0 +1,13 @@
1
+ const fz = require('../converters/fromZigbee');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['WG001-Z01'],
6
+ model: 'WG001',
7
+ vendor: 'Aeotec',
8
+ description: 'Range extender Zi',
9
+ fromZigbee: [fz.linkquality_from_basic],
10
+ toZigbee: [],
11
+ exposes: [],
12
+ },
13
+ ];
@@ -109,7 +109,7 @@ module.exports = [
109
109
  extend: extend.light_onoff_brightness({disableEffect: true}),
110
110
  },
111
111
  {
112
- zigbeeModel: ['RGBGU10Bulb50AU'],
112
+ zigbeeModel: ['RGBGU10Bulb50AU', 'RGBGU10Bulb50AU2'],
113
113
  model: 'AU-A1GUZBRGBW',
114
114
  vendor: 'Aurora Lighting',
115
115
  description: 'AOne 5.6w smart RGBW tuneable GU10 lamp',
@@ -144,7 +144,7 @@ module.exports = [
144
144
  model: 'EMIZB-132',
145
145
  vendor: 'Develco',
146
146
  description: 'Wattle AMS HAN power-meter sensor',
147
- fromZigbee: [fz.metering, fz.electrical_measurement, fz.develco_fw],
147
+ fromZigbee: [fzLocal.SPLZB134_metering, fzLocal.SPLZB134_electrical_measurement, fz.develco_fw],
148
148
  toZigbee: [tz.EMIZB_132_mode],
149
149
  ota: ota.zigbeeOTA,
150
150
  configure: async (device, coordinatorEndpoint, logger) => {
package/devices/ikea.js CHANGED
@@ -356,10 +356,10 @@ module.exports = [
356
356
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
357
357
  },
358
358
  {
359
- zigbeeModel: ['TRADFRIbulbT120E26WSopal450lm'],
359
+ zigbeeModel: ['TRADFRIbulbT120E26WSopal450lm', 'TRADFRIbulbT120E26WSopal470lm'],
360
360
  model: 'LED1937T5_E26',
361
361
  vendor: 'IKEA',
362
- description: 'LED bulb E26 450 lumen, wireless dimmable white spectrum/tube-shaped white frosted glass',
362
+ description: 'LED bulb E26 450/470 lumen, wireless dimmable white spectrum/tube-shaped white frosted glass',
363
363
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
364
364
  },
365
365
  {
@@ -397,6 +397,13 @@ module.exports = [
397
397
  description: 'TRADFRI bulb E12/E14/E17 WS 450/470/440 lumen, dimmable, white spectrum, opal white',
398
398
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
399
399
  },
400
+ {
401
+ zigbeeModel: ['TRADFRI bulb E14 WS globe 470lm'],
402
+ model: 'LED2101G4',
403
+ vendor: 'IKEA',
404
+ description: 'TRADFRI bulb E14 WS globe 470lm, dimmable, white spectrum, opal white',
405
+ extend: tradfriExtend.light_onoff_brightness_colortemp(),
406
+ },
400
407
  {
401
408
  zigbeeModel: ['TRADFRI bulb GU10 WW 400lm'],
402
409
  model: 'LED1837R5',
@@ -932,4 +939,11 @@ module.exports = [
932
939
  description: 'NYMÅNE Pendant lamp',
933
940
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
934
941
  },
942
+ {
943
+ zigbeeModel: ['STOFTMOLN ceiling/wall lamp WW37'],
944
+ model: 'T2037',
945
+ vendor: 'IKEA',
946
+ description: 'STOFTMOLN ceiling/wall lamp 37 warm light dimmable',
947
+ extend: tradfriExtend.light_onoff_brightness(),
948
+ },
935
949
  ];
package/devices/kmpcil.js CHANGED
@@ -6,6 +6,7 @@ const reporting = require('../lib/reporting');
6
6
  const globalStore = require('../lib/store');
7
7
  const utils = require('../lib/utils');
8
8
  const e = exposes.presets;
9
+ const ea = exposes.access;
9
10
 
10
11
  const kmpcilOptions={
11
12
  presence_timeout_dc: () => {
@@ -74,11 +75,11 @@ module.exports = [
74
75
  model: 'KMPCIL_RES005',
75
76
  vendor: 'KMPCIL',
76
77
  description: 'Environment sensor',
77
- exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.illuminance(), e.illuminance_lux(), e.occupancy(),
78
- e.switch()],
78
+ exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.illuminance().withAccess(ea.STATE_GET),
79
+ e.illuminance_lux().withAccess(ea.STATE_GET), e.occupancy(), e.switch()],
79
80
  fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.pressure, fz.illuminance, fz.kmpcil_res005_occupancy,
80
81
  fz.kmpcil_res005_on_off],
81
- toZigbee: [tz.kmpcil_res005_on_off],
82
+ toZigbee: [tz.kmpcil_res005_on_off, tz.illuminance],
82
83
  configure: async (device, coordinatorEndpoint, logger) => {
83
84
  const endpoint = device.getEndpoint(8);
84
85
  const binds = ['genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement',
@@ -168,7 +168,7 @@ module.exports = [
168
168
  ota: ota.ledvance,
169
169
  },
170
170
  {
171
- zigbeeModel: ['CLA 60 DIM'],
171
+ zigbeeModel: ['A60 DIM T'],
172
172
  model: '4058075728981',
173
173
  vendor: 'LEDVANCE',
174
174
  description: 'SMART+ Classic A E27 dimmable white',
package/devices/lellki.js CHANGED
@@ -137,6 +137,7 @@ module.exports = [
137
137
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
138
138
  configure: async (device, coordinatorEndpoint, logger) => {
139
139
  const endpoint = device.getEndpoint(1);
140
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
140
141
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
141
142
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
142
143
  await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
@@ -134,7 +134,7 @@ module.exports = [
134
134
  },
135
135
  },
136
136
  {
137
- fingerprint: [{modelID: 'TS110F', manufacturerName: '_TZ3000_ktuoyvt5'}],
137
+ fingerprint: [{modelID: 'TS110F', manufacturerName: '_TZ3000_ktuoyvt5'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_weaqkhab'}],
138
138
  model: 'QS-Zigbee-D02-TRIAC-L',
139
139
  vendor: 'Lonsonho',
140
140
  description: '1 gang smart dimmer switch module without neutral',
package/devices/moes.js CHANGED
@@ -455,4 +455,24 @@ module.exports = [
455
455
  await reporting.batteryVoltage(endpoint);
456
456
  },
457
457
  },
458
+ {
459
+ fingerprint: [{modelID: 'TS0011', manufacturerName: '_TZ3000_hhiodade'}],
460
+ model: 'ZS-EUB_1gang',
461
+ vendor: 'Moes',
462
+ description: 'Wall light switch (1 gang)',
463
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type, tz.tuya_backlight_mode]),
464
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type, fz.tuya_backlight_mode]),
465
+ exposes: [
466
+ e.switch(),
467
+ exposes.presets.power_on_behavior(),
468
+ exposes.presets.switch_type_2(),
469
+ exposes.enum('backlight_mode', ea.ALL, ['LOW', 'MEDIUM', 'HIGH'])
470
+ .withDescription('Indicator light status: LOW: Off | MEDIUM: On| HIGH: Inverted'),
471
+ ],
472
+ configure: async (device, coordinatorEndpoint, logger) => {
473
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
474
+ device.powerSource = 'Mains (single phase)';
475
+ device.save();
476
+ },
477
+ },
458
478
  ];
@@ -0,0 +1,17 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = require('../converters/fromZigbee');
3
+ const tz = require('../converters/toZigbee');
4
+ const e = exposes.presets;
5
+ const ea = exposes.access;
6
+
7
+ module.exports = [
8
+ {
9
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_swhwv3k3'}],
10
+ model: 'C10-3E-1.2',
11
+ vendor: 'Novo',
12
+ description: 'Curtain switch',
13
+ fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
14
+ toZigbee: [tz.tuya_cover_control, tz.tuya_cover_options],
15
+ exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
16
+ },
17
+ ];
@@ -7,7 +7,7 @@ const ea = exposes.access;
7
7
 
8
8
  module.exports = [
9
9
  {
10
- zigbeeModel: ['ivfvd7h', 'eaxp72v\u0000', 'kfvq6avy\u0000', 'fvq6avy\u0000', 'fvq6avy'],
10
+ zigbeeModel: ['ivfvd7h', 'eaxp72v\u0000', 'kfvq6avy\u0000', 'fvq6avy\u0000', 'fvq6avy', 'zk78ptr\u0000'],
11
11
  fingerprint: [
12
12
  {modelID: 'TS0601', manufacturerName: '_TZE200_zivfvd7h'},
13
13
  {modelId: 'TS0601', manufacturerName: '_TZE200_kfvq6avy'},
@@ -30,7 +30,8 @@ module.exports = [
30
30
  {vendor: 'Revolt', description: 'Thermostatic Radiator Valve Controller', model: 'NX-4911'},
31
31
  {vendor: 'Unitec', description: 'Thermostatic Radiator Valve Controller', model: '30946'},
32
32
  {vendor: 'Tesla', description: 'Thermostatic Radiator Valve Controller', model: 'TSL-TRV-GS361A'},
33
- {vendor: 'Nedis', description: 'Thermostatic Radiator Valve Controller', model: 'ZBHTR10WT'}],
33
+ {vendor: 'Nedis', description: 'Thermostatic Radiator Valve Controller', model: 'ZBHTR10WT'},
34
+ {vendor: 'TCP Smart', description: 'Smart Thermostatic Radiator Valve', model: 'TBUWTRV'}],
34
35
  exposes: [e.child_lock(), e.window_detection(), e.battery(), e.valve_detection(), e.position(), exposes.climate()
35
36
  .withSetpoint('current_heating_setpoint', 5, 30, 0.5, ea.STATE_SET).withLocalTemperature(ea.STATE)
36
37
  .withSystemMode(['off', 'auto', 'heat'], ea.STATE_SET)
package/devices/tuya.js CHANGED
@@ -20,7 +20,7 @@ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak',
20
20
  '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
21
21
  '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit', '_TZ3000_cjrngdr3',
22
22
  '_TZ3000_zloso4jk', '_TZ3000_r6buo8ba', '_TZ3000_iksasdbv', '_TZ3000_idrffznf', '_TZ3000_okaz9tjs', '_TZ3210_q7oryllx',
23
- '_TZ3000_ss98ec5d', '_TZ3000_gznh2xla', '_TZ3000_hdopuwv6', '_TZ3000_gvn91tmx'];
23
+ '_TZ3000_ss98ec5d', '_TZ3000_gznh2xla', '_TZ3000_hdopuwv6', '_TZ3000_gvn91tmx', '_TZ3000_dksbtrzs', '_TZ3000_b28wrpvx'];
24
24
 
25
25
  const tzLocal = {
26
26
  hpsz: {
@@ -737,7 +737,8 @@ module.exports = [
737
737
  {
738
738
  fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_mvn6jl7x'},
739
739
  {modelID: 'TS011F', manufacturerName: '_TZ3000_raviyuvk'}, {modelID: 'TS011F', manufacturerName: '_TYZB01_hlla45kx'},
740
- {modelID: 'TS011F', manufacturerName: '_TZ3000_92qd4sqa'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_zwaadvus'}],
740
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_92qd4sqa'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_zwaadvus'},
741
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_k6fvknrr'}],
741
742
  model: 'TS011F_2_gang_wall',
742
743
  vendor: 'TuYa',
743
744
  description: '2 gang wall outlet',
@@ -890,6 +891,7 @@ module.exports = [
890
891
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_wuheofsg'},
891
892
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_e5t9bfdv'},
892
893
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_19qb27da'},
894
+ {modelID: 'TS0501B', manufacturerName: '_TZ3210_aurnbfv4'},
893
895
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_4zinq6io'},
894
896
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_93gnbdgz'}],
895
897
  model: 'TS0501B',
@@ -1106,6 +1108,7 @@ module.exports = [
1106
1108
  description: 'Curtain/blind switch',
1107
1109
  fromZigbee: [fz.cover_position_tilt, fz.tuya_backlight_mode, fz.tuya_cover_options],
1108
1110
  toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.tuya_cover_calibration, tz.tuya_cover_reversal, tz.tuya_backlight_mode],
1111
+ meta: {coverInverted: true},
1109
1112
  whiteLabel: [{vendor: 'LoraTap', model: 'SC400'}],
1110
1113
  exposes: [e.cover_position(), exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
1111
1114
  exposes.binary('calibration', ea.ALL, 'ON', 'OFF'), exposes.binary('motor_reversal', ea.ALL, 'ON', 'OFF'),
@@ -2410,6 +2413,8 @@ module.exports = [
2410
2413
  },
2411
2414
  meta: {multiEndpoint: true},
2412
2415
  configure: async (device, coordinatorEndpoint, logger) => {
2416
+ await device.getEndpoint(1).read('genBasic',
2417
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
2413
2418
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
2414
2419
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
2415
2420
  await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
package/devices/xiaomi.js CHANGED
@@ -39,6 +39,94 @@ const preventReset = async (type, data, device) => {
39
39
  await device.getEndpoint(1).write('genBasic', payload, options);
40
40
  };
41
41
 
42
+
43
+ const fzLocal = {
44
+ aqara_trv: {
45
+ cluster: 'aqaraOpple',
46
+ type: ['attributeReport', 'readResponse'],
47
+ convert: (model, msg, publish, options, meta) => {
48
+ const result = {};
49
+ Object.entries(msg.data).forEach(([key, value]) => {
50
+ switch (parseInt(key)) {
51
+ case 0x0271:
52
+ result['state'] = {1: 'ON', 0: 'OFF'}[value];
53
+ break;
54
+ case 0x0272:
55
+ result['preset'] = {2: 'away', 1: 'auto', 0: 'manual'}[value];
56
+ break;
57
+ case 0x0273:
58
+ result['window_detection'] = {1: 'ON', 0: 'OFF'}[value];
59
+ break;
60
+ case 0x0274:
61
+ result['valve_detection'] = {1: 'ON', 0: 'OFF'}[value];
62
+ break;
63
+ case 0x0277:
64
+ result['child_lock'] = {1: 'LOCK', 0: 'UNLOCK'}[value];
65
+ break;
66
+ case 0x0279:
67
+ result['away_preset_temperature'] = (value / 100).toFixed(1);
68
+ break;
69
+ case 0x027b:
70
+ result['calibration'] = {1: true, 0: false}[value];
71
+ break;
72
+ case 0x027e:
73
+ result['sensor'] = {1: 'external', 0: 'internal'}[value];
74
+ break;
75
+ case 0x00ff: // 4e:27:49:bb:24:b6:30:dd:74:de:53:76:89:44:c4:81
76
+ case 0x00f7: // 03:28:1f:05:21:01:00:0a:21:00:00:0d:23:19:08:00:00:11:23...
77
+ case 0x0275: // 0x00000001
78
+ case 0x0276: // 04:3e:01:e0:00:00:09:60:04:38:00:00:06:a4:05:64:00:00:08:98:81:e0:00:00:08:98
79
+ case 0x027a: // 0x00
80
+ case 0x027c: // 0x00
81
+ case 0x027d: // 0x00
82
+ case 0x0280: // 0x00/0x01
83
+ case 0x040a: // 0x64
84
+ meta.logger.debug(`zigbee-herdsman-converters:aqara_trv: Unhandled key ${key} = ${value}`);
85
+ break;
86
+ default:
87
+ meta.logger.warn(`zigbee-herdsman-converters:aqara_trv: Unknown key ${key} = ${value}`);
88
+ }
89
+ });
90
+ return result;
91
+ },
92
+ },
93
+ };
94
+
95
+ const tzLocal = {
96
+ aqara_trv: {
97
+ key: ['state', 'preset', 'window_detection', 'valve_detection', 'child_lock', 'away_preset_temperature'],
98
+ convertSet: async (entity, key, value, meta) => {
99
+ switch (key) {
100
+ case 'state':
101
+ await entity.write('aqaraOpple', {0x0271: {value: {'OFF': 0, 'ON': 1}[value], type: 0x20}},
102
+ {manufacturerCode: 0x115f});
103
+ break;
104
+ case 'preset':
105
+ await entity.write('aqaraOpple', {0x0272: {value: {'manual': 0, 'auto': 1, 'away': 2}[value], type: 0x20}},
106
+ {manufacturerCode: 0x115f});
107
+ break;
108
+ case 'window_detection':
109
+ await entity.write('aqaraOpple', {0x0273: {value: {'OFF': 0, 'ON': 1}[value], type: 0x20}},
110
+ {manufacturerCode: 0x115f});
111
+ break;
112
+ case 'valve_detection':
113
+ await entity.write('aqaraOpple', {0x0274: {value: {'OFF': 0, 'ON': 1}[value], type: 0x20}},
114
+ {manufacturerCode: 0x115f});
115
+ break;
116
+ case 'child_lock':
117
+ await entity.write('aqaraOpple', {0x0277: {value: {'UNLOCK': 0, 'LOCK': 1}[value], type: 0x20}},
118
+ {manufacturerCode: 0x115f});
119
+ break;
120
+ case 'away_preset_temperature':
121
+ await entity.write('aqaraOpple', {0x0279: {value: Math.round(value * 100), type: 0x23}}, {manufacturerCode: 0x115f});
122
+ break;
123
+ default: // Unknown key
124
+ meta.logger.warn(`zigbee-herdsman-converters:aqara_trv: Unhandled key ${key}`);
125
+ }
126
+ },
127
+ },
128
+ };
129
+
42
130
  module.exports = [
43
131
  {
44
132
  zigbeeModel: ['lumi.flood.acn001'],
@@ -724,7 +812,7 @@ module.exports = [
724
812
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
725
813
  .withDescription('Decoupled mode for right button')
726
814
  .withEndpoint('right'),
727
- e.power().withAccess(ea.STATE), e.power_outage_memory(), e.led_disabled_night(),
815
+ e.power().withAccess(ea.STATE), e.power_outage_memory(), e.led_disabled_night(), e.voltage(),
728
816
  e.device_temperature().withAccess(ea.STATE), e.flip_indicator_light(),
729
817
  e.action([
730
818
  'single_left', 'double_left', 'single_center', 'double_center', 'single_right', 'double_right',
@@ -1685,7 +1773,7 @@ module.exports = [
1685
1773
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4043GL'}],
1686
1774
  description: 'MiJia light intensity sensor',
1687
1775
  fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
1688
- toZigbee: [],
1776
+ toZigbee: [tz.illuminance],
1689
1777
  meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1690
1778
  configure: async (device, coordinatorEndpoint, logger) => {
1691
1779
  const endpoint = device.getEndpoint(1);
@@ -1693,7 +1781,8 @@ module.exports = [
1693
1781
  await reporting.illuminance(endpoint, {min: 15, max: constants.repInterval.HOUR, change: 500});
1694
1782
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
1695
1783
  },
1696
- exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux(), e.power_outage_count(false)],
1784
+ exposes: [e.battery(), e.battery_voltage(), e.illuminance().withAccess(ea.STATE_GET),
1785
+ e.illuminance_lux().withAccess(ea.STATE_GET), e.power_outage_count(false)],
1697
1786
  },
1698
1787
  {
1699
1788
  zigbeeModel: ['lumi.light.rgbac1'],
@@ -2164,4 +2253,18 @@ module.exports = [
2164
2253
  await endpoint1.read('aqaraOpple', [0x0125], {manufacturerCode: 0x115f});
2165
2254
  },
2166
2255
  },
2256
+ {
2257
+ zigbeeModel: ['lumi.airrtc.agl001'],
2258
+ model: 'SRTS-A01',
2259
+ vendor: 'Xiaomi',
2260
+ description: 'Aqara Smart Radiator Thermostat E1',
2261
+ fromZigbee: [fzLocal.aqara_trv, fz.thermostat],
2262
+ toZigbee: [tzLocal.aqara_trv, tz.thermostat_occupied_heating_setpoint],
2263
+ exposes: [e.switch().setAccess('state', ea.STATE_SET),
2264
+ exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
2265
+ .withLocalTemperature(ea.STATE).withPreset(['manual', 'away', 'auto'], ea.STATE_SET),
2266
+ e.child_lock(), e.window_detection(), e.valve_detection(),
2267
+ e.away_preset_temperature(),
2268
+ ],
2269
+ },
2167
2270
  ];
package/devices/yale.js CHANGED
@@ -47,7 +47,7 @@ module.exports = [
47
47
  model: 'YMF30',
48
48
  vendor: 'Yale',
49
49
  description: 'Digital lock',
50
- extend: lockExtend(),
50
+ extend: lockExtend({battery: {dontDividePercentage: true}}),
51
51
  },
52
52
  {
53
53
  zigbeeModel: ['iZBModule01', '0700000001'],
package/lib/exposes.js CHANGED
@@ -423,6 +423,12 @@ class Climate extends Base {
423
423
  return this;
424
424
  }
425
425
 
426
+ withSwingMode(modes, access=a.ALL) {
427
+ assert(!this.endpoint, 'Cannot add feature after adding endpoint');
428
+ this.features.push(new Enum('swing_mode', access, modes).withDescription('Swing mode'));
429
+ return this;
430
+ }
431
+
426
432
  withSensor(sensors) {
427
433
  assert(!this.endpoint, 'Cannot add feature after adding endpoint');
428
434
  this.features.push(new Enum('sensor', access.STATE_SET, sensors).withDescription('Select temperature sensor to use'));
package/lib/reporting.js CHANGED
@@ -159,7 +159,7 @@ module.exports = {
159
159
  await endpoint.configureReporting('hvacThermostat', p);
160
160
  },
161
161
  thermostatUnoccupiedCoolingSetpoint: async (endpoint, overrides) => {
162
- const p = payload('occupiedCoolingSetpoint', 0, repInterval.HOUR, 10, overrides);
162
+ const p = payload('unoccupiedCoolingSetpoint', 0, repInterval.HOUR, 10, overrides);
163
163
  await endpoint.configureReporting('hvacThermostat', p);
164
164
  },
165
165
  thermostatPIHeatingDemand: async (endpoint, overrides) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.611",
3
+ "version": "14.0.612",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [