Browse Source

Fix black and isort from plug merge (#147)

J. Nick Koston 1 year ago
parent
commit
33f097efdd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      switchbot/adv_parsers/plug.py

+ 1 - 1
switchbot/adv_parsers/plug.py

@@ -10,5 +10,5 @@ def process_woplugmini(data: bytes, mfr_data: bytes | None) -> dict[str, bool |
         "switchMode": True,
         "isOn": mfr_data[7] == 0x80,
         "wifi_rssi": -mfr_data[9],
-        "power": ( ( ( mfr_data[10] << 8 ) + mfr_data[11] ) & 0x7fff ) / 10  # W
+        "power": (((mfr_data[10] << 8) + mfr_data[11]) & 0x7FFF) / 10,  # W
     }