Skip to content

Commit cc4c516

Browse files
3reality-supportjintjKoenkk
authored
fix(ignore): Add more Third Reality custom clusters (#7970)
* update 3r waterleak ts * add 3r soil sensor * update 3r soil sensor * update motion and door sensor * update 3r switch_gen3 vibration garage * Update third_reality.ts * Update third_reality.ts * update 3r * update 3r * update 3r temp_humid_sensor and soil * update 3r * update 3r switch_gen3 vibration and garage * update 3r temp_humid_sensor and soil * update --------- Co-authored-by: jintj <[email protected]> Co-authored-by: Koen Kanters <[email protected]>
1 parent decaa92 commit cc4c516

File tree

1 file changed

+52
-6
lines changed

1 file changed

+52
-6
lines changed

src/devices/third_reality.ts

+52-6
Original file line numberDiff line numberDiff line change
@@ -259,26 +259,72 @@ const definitions: DefinitionWithExtend[] = [
259259
model: '3RTHS24BZ',
260260
vendor: 'Third Reality',
261261
description: 'Temperature and humidity sensor',
262-
fromZigbee: [fz.temperature, fz.humidity],
263-
toZigbee: [],
264-
exposes: [e.temperature(), e.humidity()],
265-
extend: [battery({voltage: true}), forcePowerSource({powerSource: 'Battery'})],
262+
extend: [
263+
temperature(),
264+
humidity(),
265+
battery(),
266+
battery({voltage: true}),
267+
forcePowerSource({powerSource: 'Battery'}),
268+
deviceAddCustomCluster('3rSpecialCluster', {
269+
ID: 0xff01,
270+
manufacturerCode: 0x1233,
271+
attributes: {
272+
celsiusDegreeCalibration: {ID: 0x0031, type: Zcl.DataType.INT16},
273+
humidityCalibration: {ID: 0x0032, type: Zcl.DataType.INT16},
274+
fahrenheitDegreeCalibration: {ID: 0x0033, type: Zcl.DataType.INT16},
275+
},
276+
commands: {},
277+
commandsResponse: {},
278+
}),
279+
],
266280
ota: ota.zigbeeOTA,
267281
},
268282
{
269283
zigbeeModel: ['3RSM0147Z'],
270284
model: '3RSM0147Z',
271285
vendor: 'Third Reality',
272286
description: 'Soil sensor',
273-
extend: [temperature(), humidity(), battery(), forcePowerSource({powerSource: 'Battery'})],
287+
extend: [
288+
temperature(),
289+
humidity(),
290+
battery(),
291+
forcePowerSource({powerSource: 'Battery'}),
292+
deviceAddCustomCluster('3rSoilSpecialCluster', {
293+
ID: 0xff01,
294+
manufacturerCode: 0x1407,
295+
attributes: {
296+
celsiusDegreeCalibration: {ID: 0x0031, type: Zcl.DataType.INT16},
297+
humidityCalibration: {ID: 0x0032, type: Zcl.DataType.INT16},
298+
fahrenheitDegreeCalibration: {ID: 0x0033, type: Zcl.DataType.INT16},
299+
},
300+
commands: {},
301+
commandsResponse: {},
302+
}),
303+
],
274304
ota: ota.zigbeeOTA,
275305
},
276306
{
277307
zigbeeModel: ['3RTHS0224Z'],
278308
model: '3RTHS0224Z',
279309
vendor: 'Third Reality',
280310
description: 'Temperature and humidity sensor lite',
281-
extend: [temperature(), humidity(), battery(), forcePowerSource({powerSource: 'Battery'})],
311+
extend: [
312+
temperature(),
313+
humidity(),
314+
battery(),
315+
forcePowerSource({powerSource: 'Battery'}),
316+
deviceAddCustomCluster('3rSpecialCluster', {
317+
ID: 0xff01,
318+
manufacturerCode: 0x1233,
319+
attributes: {
320+
celsiusDegreeCalibration: {ID: 0x0031, type: Zcl.DataType.INT16},
321+
humidityCalibration: {ID: 0x0032, type: Zcl.DataType.INT16},
322+
fahrenheitDegreeCalibration: {ID: 0x0033, type: Zcl.DataType.INT16},
323+
},
324+
commands: {},
325+
commandsResponse: {},
326+
}),
327+
],
282328
ota: ota.zigbeeOTA,
283329
},
284330
{

0 commit comments

Comments
 (0)