Prechádzať zdrojové kódy

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

J. Nick Koston 1 rok pred
rodič
commit
9f921dbe3c
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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],
     }