We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36b0359 commit 56920c7Copy full SHA for 56920c7
switchbot/adv_parsers/contact.py
@@ -11,5 +11,5 @@ def process_wocontact(data: bytes, mfr_data: bytes | None) -> dict[str, bool | i
11
"contact_open": data[3] & 0b00000010 == 0b00000010,
12
"contact_timeout": data[3] & 0b00000110 == 0b00000110,
13
"is_light": bool(data[3] & 0b00000001),
14
- "button_count": (data[7] & 0b11110000) >> 4,
+ "button_count": (data[8] & 0b00001111),
15
}
0 commit comments