Просмотр исходного кода

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 2 месяцев назад
Родитель
Сommit
a8a4573d5b
1 измененных файлов с 1 добавлено и 1 удалено
  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")