Skip to content

Commit 77fe20f

Browse files
authored
feat: SNZB-02D: add support for temperature and humidity calibration (#8685)
1 parent db7595c commit 77fe20f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/devices/sonoff.ts

+24
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,8 @@ const definitions: DefinitionWithExtend[] = [
862862
comfortHumidityMin: {ID: 0x0005, type: Zcl.DataType.UINT16},
863863
comfortHumidityMax: {ID: 0x0006, type: Zcl.DataType.UINT16},
864864
temperatureUnits: {ID: 0x0007, type: Zcl.DataType.UINT16},
865+
temperatureCalibration: {ID: 0x2003, type: Zcl.DataType.INT16},
866+
humidityCalibration: {ID: 0x2004, type: Zcl.DataType.INT16},
865867
},
866868
commands: {},
867869
commandsResponse: {},
@@ -926,6 +928,28 @@ const definitions: DefinitionWithExtend[] = [
926928
description:
927929
'The unit of the temperature displayed on the device screen. Note: wake up the device by pressing the button on the back before changing this value.',
928930
}),
931+
m.numeric({
932+
name: 'temperature_calibration',
933+
cluster: 'customSonoffSnzb02d',
934+
attribute: 'temperatureCalibration',
935+
description: 'Offset to add/subtract to the reported temperature',
936+
valueMin: -50,
937+
valueMax: 50,
938+
scale: 100,
939+
valueStep: 0.1,
940+
unit: '°C',
941+
}),
942+
m.numeric({
943+
name: 'humidity_calibration',
944+
cluster: 'customSonoffSnzb02d',
945+
attribute: 'humidityCalibration',
946+
description: 'Offset to add/subtract to the reported relative humidity',
947+
valueMin: -50,
948+
valueMax: 50,
949+
scale: 100,
950+
valueStep: 0.1,
951+
unit: '%',
952+
}),
929953
],
930954
},
931955
{

0 commit comments

Comments
 (0)