浏览代码

fix: wifi rssi incorrect on plugs (should be negative) (#56)

J. Nick Koston 1 年之前
父节点
当前提交
9f921dbe3c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      switchbot/__init__.py

+ 1 - 1
switchbot/__init__.py

@@ -142,7 +142,7 @@ def _process_woplugmini(data: bytes, mfr_data: bytes | None) -> dict[str, bool |
     return {
         "switchMode": True,
         "isOn": mfr_data[7] == 0x80,
-        "wifi_rssi": mfr_data[9],
+        "wifi_rssi": -mfr_data[9],
     }