Skip to content

Commit bd614c3

Browse files
authored
Add plug mini power field (#142)
1 parent 07fb14e commit bd614c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

switchbot/adv_parsers/plug.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ def process_woplugmini(data: bytes, mfr_data: bytes | None) -> dict[str, bool |
1010
"switchMode": True,
1111
"isOn": mfr_data[7] == 0x80,
1212
"wifi_rssi": -mfr_data[9],
13+
"power": ( ( ( mfr_data[10] << 8 ) + mfr_data[11] ) & 0x7fff ) / 10 # W
1314
}

0 commit comments

Comments
 (0)