File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ exports.names = {
35
35
"2a6d" : "Pressure" ,
36
36
"2a6e" : "Temperature" ,
37
37
"2a6f" : "Humidity" ,
38
+ "2af2" : "Energy" ,
38
39
// https://www.bluetooth.com/specifications/assigned-numbers/16-bit-uuids-for-members/
39
40
"fe0f" : "Philips" ,
40
41
"fe95" : "Xiaomi" ,
@@ -197,6 +198,11 @@ exports.handlers = {
197
198
// probably not meant for advertising, but seems useful!
198
199
return { analog : a [ 0 ] | ( a . length > 1 ? ( a [ 1 ] << 8 ) : 0 ) }
199
200
} ,
201
+ "2af2" : function ( a ) { // Energy
202
+ return {
203
+ energy : a . readUInt32BE ( )
204
+ }
205
+ } ,
200
206
// org.bluetooth.characteristic.digital_output 0x2A57 ?
201
207
"ffff" : function ( a ) { // 0xffff isn't standard anything - just transmit it as 'data'
202
208
if ( a . length == 1 )
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ const deviceTypes = {
33
33
unit_of_measurement : "%" ,
34
34
device_class : "battery"
35
35
} ,
36
+ energy : {
37
+ unit_of_measurement : "Wh" ,
38
+ device_class : "energy"
39
+ } ,
36
40
illuminance : { // lx
37
41
unit_of_measurement : "lx" ,
38
42
device_class : "illuminance"
You can’t perform that action at this time.
0 commit comments