node-switchbot 1.6.0-beta.10 → 1.6.0-beta.12

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.
@@ -255,12 +255,10 @@ class SwitchbotAdvertising {
255
255
  return null;
256
256
  }
257
257
 
258
-
259
258
  let byte1 = buf.readUInt8(1);
260
259
  let byte2 = buf.readUInt8(2);
261
260
  let byte5 = buf.readUInt8(5);
262
261
 
263
-
264
262
  let tested = byte1 & 0b10000000 ? true : false;
265
263
  let movement = byte1 & 0b01000000 ? true : false;
266
264
  let battery = byte2 & 0b01111111;
@@ -388,6 +386,7 @@ class SwitchbotAdvertising {
388
386
  let byte9 = buf.readUInt8(9);
389
387
  let byte10 = buf.readUInt8(10);//bulb mode
390
388
 
389
+ let power = byte1;
391
390
  let red = byte3;
392
391
  let green = byte4;
393
392
  let blue = byte5;
@@ -404,6 +403,7 @@ class SwitchbotAdvertising {
404
403
  model: "u",
405
404
  modelName: "WoBulb",
406
405
  color_temperature: color_temperature,
406
+ power: power,
407
407
  state: state,
408
408
  red: red,
409
409
  green: green,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-switchbot",
3
- "version": "1.6.0-beta.10",
3
+ "version": "1.6.0-beta.12",
4
4
  "description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
5
5
  "main": "./lib/switchbot.js",
6
6
  "files": [