فهرست منبع

fix(raykube_a1promax_lock): fix misunderstandings in dps mappings

- dp 47 was mapped as open, but is actually the lock_state (inverted)
- dp 73 is set_unlock_code but uses a different format than currently implemented

User proposes a patch to support remembering state from
record (reported when other sources change the key), and having a
separate hardcoded format under a different dp name set_unlock_key,
but both maintaining state about devices and hardcoding specific device
implementations is against the policy of this integration.

With this change it should be possible to implement the state
maintenance outside of this integration, but if the record is not
important, and like other locks the lock can be unlocked by setting
the key at the same time as using it, just in a different format, then
adding `format` support to the set_unlock_code should be a solution.

Issue #6248
Jason Rumney 7 ساعت پیش
والد
کامیت
2231b82db4
1فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 7 3
      custom_components/tuya_local/devices/raykube_a1promax_lock.yaml

+ 7 - 3
custom_components/tuya_local/devices/raykube_a1promax_lock.yaml

@@ -29,13 +29,17 @@ entities:
         name: lock
       - id: 47
         type: boolean
-        name: open
-        readonly: true
+        name: lock_state
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
       - id: 73
         type: base64
         optional: true
         sensitive: true
-        name: set_unlock_code
+        name: set_unlock_code_nonstandard
       - id: 61
         type: base64
         optional: true