File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,16 @@ class AttributeDefs(BaseAttributeDefs):
50
50
zcl_type = DataTypeId .uint16 ,
51
51
)
52
52
53
+ temperature_calibration = ZCLAttributeDef (
54
+ id = 0x2003 ,
55
+ type = t .int16s ,
56
+ )
57
+
58
+ humidity_calibration = ZCLAttributeDef (
59
+ id = 0x2004 ,
60
+ type = t .int16s ,
61
+ )
62
+
53
63
54
64
(
55
65
QuirkBuilder ("SONOFF" , "SNZB-02D" )
@@ -105,5 +115,27 @@ class AttributeDefs(BaseAttributeDefs):
105
115
translation_key = "display_unit" ,
106
116
fallback_name = "Display unit" ,
107
117
)
118
+ .number (
119
+ CustomSonoffCluster .AttributeDefs .temperature_calibration .name ,
120
+ CustomSonoffCluster .cluster_id ,
121
+ min_value = - 50 ,
122
+ max_value = 50 ,
123
+ step = 0.1 ,
124
+ unit = TemperatureUnit ,
125
+ multiplier = 0.01 ,
126
+ translation_key = "temperature_calibration" ,
127
+ fallback_name = "Temperature calibration" ,
128
+ )
129
+ .number (
130
+ CustomSonoffCluster .AttributeDefs .humidity_calibration .name ,
131
+ CustomSonoffCluster .cluster_id ,
132
+ min_value = - 50 ,
133
+ max_value = 50 ,
134
+ step = 0.1 ,
135
+ unit = PERCENTAGE ,
136
+ multiplier = 0.01 ,
137
+ translation_key = "humidity_calibration" ,
138
+ fallback_name = "Humidity calibration" ,
139
+ )
108
140
.add_to_registry ()
109
141
)
You can’t perform that action at this time.
0 commit comments