Răsfoiți Sursa

fix (lock): don't include the admin flag in the unlock request

Based on the limited samples of data available, this admin flag from the
Tuya documentation does not seem to be used in practice, and it doesn't
seem a secure way of granting admin rights anyway.

Discussion #4013
Jason Rumney 4 luni în urmă
părinte
comite
a8a4573d5b
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      custom_components/tuya_local/lock.py

+ 1 - 1
custom_components/tuya_local/lock.py

@@ -229,5 +229,5 @@ class TuyaLocalLock(TuyaLocalEntity, LockEntity):
         msg += member_id.to_bytes(2, "big")
         msg += code.encode("ascii")
         msg += source.to_bytes(2, "big")
-        msg += b"\x00"  # ordinary user (0x01 is admin)
+        # msg += b"\x00"  # ordinary user (0x01 is admin)
         return b64encode(msg).decode("utf-8")