node-switchbot 1.9.2-beta.0 → 1.9.2-beta.1
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.
|
@@ -174,8 +174,8 @@ class SwitchbotAdvertising {
|
|
|
174
174
|
const byte1 = buf.readUInt8(1);
|
|
175
175
|
const byte2 = buf.readUInt8(2);
|
|
176
176
|
|
|
177
|
-
const mode = byte1 & 0b10000000 ? true : false; // Whether the light switch Add-on is used or not
|
|
178
|
-
const state = byte1 & 0b01000000 ?
|
|
177
|
+
const mode = byte1 & 0b10000000 ? true : false; // Whether the light switch Add-on is used or not. 0 = press, 1 = switch
|
|
178
|
+
const state = byte1 & 0b01000000 ? false : true; // Whether the switch status is ON or OFF. 0 = on, 1 = off
|
|
179
179
|
const battery = byte2 & 0b01111111; // %
|
|
180
180
|
|
|
181
181
|
const data = {
|
package/package.json
CHANGED