Explorar el Código

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 hace 2 meses
padre
commit
a8a4573d5b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 += member_id.to_bytes(2, "big")
         msg += code.encode("ascii")
         msg += code.encode("ascii")
         msg += source.to_bytes(2, "big")
         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")
         return b64encode(msg).decode("utf-8")