Prechádzať zdrojové kódy

feat (ble locks): expose complex config fields as text entities

Allow complex configuration options to be manipulated from outside
this integration by exposing the raw data in text entities.

Since they have multiple fields, it isn't really possible to natively
expose them from the config file without significant custom entity
code, so allow this to be done by another integration as per pet
feeder meal plans.

PR #1921
Jason Rumney 3 mesiacov pred
rodič
commit
09ad242d70

+ 120 - 51
custom_components/tuya_local/devices/ailrinni_fingerprint_lock.yaml

@@ -11,22 +11,8 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: create_unlock_method
-        optional: true
-        sensitive: true
-      - id: 2
-        type: string
-        name: delete_unlock_method
-        optional: true
-      - id: 3
-        type: string
-        name: modify_unlock_method
-        optional: true
-        sensitive: true
       - id: 6
-        type: string
+        type: base64
         optional: true
         name: bluetooth_unlock
       - id: 12
@@ -58,35 +44,11 @@ entities:
             value: false
           - dps_val: false  # Locked
             value: true
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_create
-      - id: 52
-        type: string
-        optional: true
-        name: temp_pwd_delete
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_modify
-      - id: 54
-        type: string
-        optional: true
-        sensitive: true
-        name: sync_method
       - id: 55
         type: integer
         name: unlock_temp_pwd
         optional: true
         persist: false
-      - id: 60
-        type: string
-        optional: true
-        sensitive: true
-        name: remote_no_pd_setkey
       - id: 61
         type: base64
         optional: true
@@ -102,18 +64,6 @@ entities:
         type: integer
         optional: true
         persist: false
-      - id: 64
-        type: string
-        optional: true
-        name: pwd_offline_time
-      - id: 65
-        type: string
-        optional: true
-        name: offline_pwd_cleared
-      - id: 66
-        type: string
-        optional: true
-        name: offline_pwd_clear_all
       - id: 67
         type: string
         optional: true
@@ -182,3 +132,122 @@ entities:
             step: 33
             value: 100
             icon: "mdi:volume-high"
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 60
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 52
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      - id: 53
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      - id: 64
+        type: string
+        optional: true
+        name: value
+  - entity: sensor
+    name: Used offline password
+    category: diagnostic
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 65
+        type: string
+        optional: true
+        name: sensor
+        sensitive: true
+  - entity: sensor
+    name: Cleared offline passwords
+    category: diagnostic
+    icon: "mdi:lock-open-remove"
+    hidden: true
+    dps:
+      - id: 66
+        type: string
+        optional: true
+        name: sensor
+        sensitive: true

+ 33 - 14
custom_components/tuya_local/devices/ble_kb150a_lock.yaml

@@ -7,20 +7,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: unlock_method_create
-        optional: true
-        sensitive: true
-      - id: 2
-        type: string
-        name: unlock_method_delete
-        optional: true
-      - id: 3
-        type: string
-        name: unlock_method_modify
-        optional: true
-        sensitive: true
       - id: 12
         type: integer
         name: unlock_fingerprint
@@ -163,3 +149,36 @@ entities:
             value: chinese
           - dps_val: english
             value: english
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true

+ 54 - 22
custom_components/tuya_local/devices/ble_positivo_smart_fechadura.yaml

@@ -6,23 +6,10 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: unlock_method_create
-        optional: true
-      - id: 2
-        type: string
-        name: unlock_method_delete
-        optional: true
-      - id: 3
-        type: string
-        name: unlock_method_modify
-        optional: true
       - id: 18
         type: boolean
         name: open_inside
         optional: true
-        persist: false
       - id: 19
         type: integer
         name: unlock_ble
@@ -40,15 +27,6 @@ entities:
       - id: 47
         type: boolean
         name: lock_state
-      - id: 54
-        type: base64
-        name: sync_method
-        optional: true
-      - id: 60
-        type: string
-        name: remote_no_pd_setkey
-        optional: true
-        sensitive: true
       - id: 61
         type: base64
         name: code_unlock
@@ -203,3 +181,57 @@ entities:
             value: shock
           - dps_val: defense
             value: defense
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 60
+        type: string
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:reset-lock"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        name: value
+        optional: true

+ 119 - 50
custom_components/tuya_local/devices/gainsboroughliberty_entrance_lock.yaml

@@ -6,20 +6,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: create_unlock_method
-        optional: true
-        sensitive: true
-      - id: 2
-        type: string
-        name: delete_unlock_method
-        optional: true
-      - id: 3
-        type: string
-        name: modify_unlock_method
-        optional: true
-        sensitive: true
       - id: 12
         type: integer
         name: unlock_fingerprint
@@ -72,25 +58,6 @@ entities:
             value: false
           - dps_val: false  # Locked
             value: true
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_create
-      - id: 52
-        type: string
-        optional: true
-        name: temp_pwd_delete
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_modify
-      - id: 54
-        type: string
-        optional: true
-        sensitive: true
-        name: sync_method
       - id: 55
         type: integer
         name: unlock_temp_pwd
@@ -111,18 +78,6 @@ entities:
         type: integer
         optional: true
         persist: false
-      - id: 64
-        type: string
-        optional: true
-        name: pwd_offline_time
-      - id: 65
-        type: string
-        optional: true
-        name: offline_pwd_cleared
-      - id: 66
-        type: string
-        optional: true
-        name: offline_pwd_clear_all
       - id: 67
         type: string
         optional: true
@@ -151,11 +106,6 @@ entities:
         optional: true
         sensitive: true
         name: ble_unlock_check
-      - id: 72
-        type: string
-        optional: true
-        sensitive: true
-        name: remote_pd_setkey_check
   - entity: sensor
     class: battery
     dps:
@@ -337,3 +287,122 @@ entities:
         type: boolean
         name: lock
         optional: true
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 52
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      - id: 53
+        type: string
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      - id: 64
+        type: string
+        optional: true
+        name: value
+  - entity: sensor
+    name: Used offline password
+    category: diagnostic
+    icon: "mdi:lock-open-minus"
+    dps:
+      - id: 65
+        type: string
+        optional: true
+        sensitive: true
+        name: sensor
+  - entity: sensor
+    name: Clear offline passwords
+    icon: "mdi:lock-open-remove"
+    category: diagnostic
+    hidden: true
+    dps:
+      - id: 66
+        type: string
+        optional: true
+        sensitive: true
+        name: sensor
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 72
+        type: string
+        optional: true
+        sensitive: true
+        name: value

+ 145 - 85
custom_components/tuya_local/devices/hornbill_y4_smart_lock.yaml

@@ -6,28 +6,6 @@ products:
 entities:
   - entity: lock
     dps:
-      # [Add unlocking method] After the device is online, add unlocking
-      # methods. Support adding fingerprint, password, card and face unlocking
-      # methods; support administrator tagging.
-      - id: 1
-        type: string
-        optional: true
-        sensitive: true
-        name: unlock_method_create
-      # [Delete unlocking method] After the device is online, delete the
-      # unlocking method. Supports deleting fingerprint, password, card and
-      # face unlocking methods. This dp appears in pairs with the added dp.
-      - id: 2
-        type: string
-        optional: true
-        sensitive: true
-        name: unlock_method_delete
-      # [Modify unlocking method] After the device is online, you can modify
-      # the name of the unlocking method and the content of the password.
-      - id: 3
-        type: string
-        optional: true
-        name: unlock_method_modify
       # [Report unlocking record] is used for the device to report the record
       # of fingerprint unlocking. This dp is only enabled when the smart lock
       # product has a fingerprint recognition function in the hardware.
@@ -109,37 +87,6 @@ entities:
         type: boolean
         optional: true
         name: lock_state
-      # [Online Temporary Password] is used to add an online temporary
-      # password, and supports setting time periods and recurring time limits.
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temporary_password_create
-      # [Online temporary password] is used to delete the online temporary
-      # password.
-      - id: 52
-        type: string
-        optional: true
-        persist: false
-        name: temporary_password_delete
-      # [Online temporary password] is used to modify the password content and
-      # corresponding validity period of the online temporary password.
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        persist: false
-        name: temporary_password_modify
-      # [Synchronous unlocking method] is used to synchronize all unlocking
-      # methods on the local device with the mobile phone. It is strongly
-      # recommended to enable this function.
-      - id: 54
-        type: string
-        optional: true
-        persist: false
-        sensitive: true
-        name: synch_method
       # [Report unlocking record] is used for the device to report the record
       # of online temporary password unlocking.
       - id: 55
@@ -185,29 +132,6 @@ entities:
         range:
           min: 0
           max: 999
-      # [Offline Password] is used to synchronize the timestamp between the
-      # cloud and the device. If it is not selected or not synchronized, the
-      # offline password will not be available.
-      - id: 64
-        type: string
-        optional: true
-        persist: false
-        name: password_offline_time
-      # [Offline password clear] When a single offline password is cleared
-      # locally on the device, the clearing operation record is reported.
-      - id: 65
-        type: string
-        optional: true
-        persist: false
-        name: offline_pwd_cleared
-      # [Offline password clear] When all offline passwords are cleared locally
-      # on the device, the clearing operation record is reported.
-      - id: 66
-        type: string
-        optional: true
-        persist: false
-        sensitive: true
-        name: unlock_offline_clear
       # [Report unlocking record] is used for the device to report offline
       # password unlocking records.
       - id: 67
@@ -233,15 +157,6 @@ entities:
         optional: true
         persist: false
         sensitive: true
-      # [Remote unlock] is used to configure the key required for remote
-      # unlocking. If the device needs to be unlocked remotely, this DP is
-      # required.
-      - id: 73
-        type: string
-        name: remote_pd_setkey_check
-        optional: true
-        persist: false
-        sensitive: true
   - entity: event
     name: Alert
     dps:
@@ -466,3 +381,148 @@ entities:
         range:
           min: 1
           max: 1800
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      # [Remote unlock] is used to configure the key required for remote
+      # unlocking. If the device needs to be unlocked remotely, this DP is
+      # required.
+      - id: 73
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      # [Add unlocking method] After the device is online, add unlocking
+      # methods. Support adding fingerprint, password, card and face unlocking
+      # methods; support administrator tagging.
+      - id: 1
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      # [Delete unlocking method] After the device is online, delete the
+      # unlocking method. Supports deleting fingerprint, password, card and
+      # face unlocking methods. This dp appears in pairs with the added dp.
+      - id: 2
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      # [Modify unlocking method] After the device is online, you can modify
+      # the name of the unlocking method and the content of the password.
+      - id: 3
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      # [Online Temporary Password] is used to add an online temporary
+      # password, and supports setting time periods and recurring time limits.
+      - id: 51
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      # [Online temporary password] is used to delete the online temporary
+      # password.
+      - id: 52
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      # [Online temporary password] is used to modify the password content and
+      # corresponding validity period of the online temporary password.
+      - id: 53
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      # [Synchronous unlocking method] is used to synchronize all unlocking
+      # methods on the local device with the mobile phone. It is strongly
+      # recommended to enable this function.
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      # [Offline Password] is used to synchronize the timestamp between the
+      # cloud and the device. If it is not selected or not synchronized, the
+      # offline password will not be available.
+      - id: 64
+        type: string
+        optional: true
+        persist: false
+        name: value
+  - entity: sensor
+    name: Used offline password
+    category: diagnostic
+    dps:
+      # [Offline password clear] When a single offline password is cleared
+      # locally on the device, the clearing operation record is reported.
+      - id: 65
+        type: base64
+        optional: true
+        name: sensor
+  - entity: sensor
+    name: Cleared offline passwords
+    category: diagnostic
+    dps:
+      # [Offline password clear] When all offline passwords are cleared locally
+      # on the device, the clearing operation record is reported.
+      - id: 66
+        type: base64
+        optional: true
+        persist: false
+        sensitive: true
+        name: value

+ 54 - 24
custom_components/tuya_local/devices/nice_digi_lock.yaml

@@ -5,20 +5,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: unlock_method_create
-        optional: true
-        sensitive: true
-      - id: 2
-        type: string
-        name: unlock_method_delete
-        optional: true
-      - id: 3
-        type: string
-        name: unlock_method_modify
-        optional: true
-        sensitive: true
       - id: 12
         type: integer
         name: unlock_fingerprint
@@ -41,11 +27,6 @@ entities:
         type: boolean
         name: lock_state
         optional: true
-      - id: 54
-        type: string
-        name: sync_method
-        optional: true
-        sensitive: true
       - id: 61
         type: base64
         name: code_unlock
@@ -66,11 +47,6 @@ entities:
         name: ble_unlock_check
         optional: true
         sensitive: true
-      - id: 73
-        type: string
-        name: remote_pd_setkey_check
-        optional: true
-        sensitive: true
   - entity: sensor
     class: battery
     category: diagnostic
@@ -157,3 +133,57 @@ entities:
       - id: 78
         type: boolean
         name: switch
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 73
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        name: value
+        optional: true
+        sensitive: true

+ 124 - 48
custom_components/tuya_local/devices/orion_dl033ha_lock.yaml

@@ -7,20 +7,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: create_unlock_method
-        optional: true
-        sensitive: true
-      - id: 2
-        type: string
-        name: delete_unlock_method
-        optional: true
-      - id: 3
-        type: string
-        name: modify_unlock_method
-        optional: true
-        sensitive: true
       - id: 12
         type: integer
         name: unlock_fingerprint
@@ -67,25 +53,6 @@ entities:
             value: false
           - dps_val: false  # Locked
             value: true
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_create
-      - id: 52
-        type: string
-        optional: true
-        name: temp_pwd_delete
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_modify
-      - id: 54
-        type: string
-        optional: true
-        sensitive: true
-        name: sync_method
       - id: 55
         type: integer
         name: unlock_temp_pwd
@@ -106,18 +73,6 @@ entities:
         type: integer
         optional: true
         persist: false
-      - id: 64
-        type: string
-        optional: true
-        name: pwd_offline_time
-      - id: 65
-        type: string
-        optional: true
-        name: offline_pwd_cleared
-      - id: 66
-        type: string
-        optional: true
-        name: offline_pwd_clear_all
       - id: 67
         type: string
         optional: true
@@ -151,14 +106,18 @@ entities:
         optional: true
         sensitive: true
         name: unlock_record_check
-      - id: 73
+      - id: 74
         type: string
         optional: true
-        name: remote_pd_setkey_check
+        name: unlock_multi
+        mapping:
+          - dps_val: null
+            value: null
+          - value: 1
       - id: 74
         type: string
         optional: true
-        name: unlock_double_kit
+        name: double_unlock_details
       - id: 86
         type: integer
         optional: true
@@ -435,3 +394,120 @@ entities:
             icon: "mdi:broadcast"
           - dps_val: false
             icon: "mdi:broadcast-off"
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 73
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 52
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      - id: 53
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: string
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      - id: 64
+        type: string
+        optional: true
+        name: value
+  - entity: sensor
+    name: Used offline password
+    category: diagnostic
+    icon: "mdi:lock-minus"
+    hidden: true
+    dps:
+      - id: 65
+        type: base64
+        optional: true
+        name: sensor
+  - entity: sensor
+    name: Cleared offline passwords
+    icon: "mdi:lock-remove"
+    category: diagnostic
+    dps:
+      - id: 66
+        type: string
+        optional: true
+        name: sensor

+ 108 - 46
custom_components/tuya_local/devices/otu_r1o1_lock.yaml

@@ -6,20 +6,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        optional: true
-        sensitive: true
-        name: unlock_method_create
-      - id: 2
-        type: string
-        optional: true
-        sensitive: true
-        name: unlock_method_delete
-      - id: 3
-        type: string
-        optional: true
-        name: unlock_method_modify
       - id: 6
         type: string
         optional: true
@@ -73,35 +59,11 @@ entities:
         type: boolean
         optional: true
         name: rtc_lock
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temporary_password_create
-      - id: 52
-        type: string
-        optional: true
-        name: temporary_password_delete
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        name: temporary_password_modify
-      - id: 54
-        type: string
-        optional: true
-        sensitive: true
-        name: synch_method
       - id: 55
         type: integer
         optional: true
         persist: false
         name: unlock_temp_pwd
-      - id: 60
-        type: string
-        optional: true
-        sensitive: true
-        name: remote_no_pd_setkey
       - id: 61
         type: base64
         optional: true
@@ -117,14 +79,6 @@ entities:
         optional: true
         persist: false
         name: unlock_voice
-      - id: 64
-        type: string
-        optional: true
-        name: password_offline_time
-      - id: 66
-        type: string
-        optional: true
-        name: unlock_offline_clear
       - id: 67
         type: string
         optional: true
@@ -211,3 +165,111 @@ entities:
         mapping:
           - dps_val: null
             value: false
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 60
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 52
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      - id: 53
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      - id: 64
+        type: string
+        optional: true
+        name: value
+  - entity: sensor
+    name: Cleared offline passwords
+    category: diagnostic
+    icon: "mdi:lock-remove"
+    hidden: true
+    dps:
+      - id: 66
+        type: base64
+        optional: true
+        name: sensor

+ 98 - 42
custom_components/tuya_local/devices/primebras_athenas_lock.yaml

@@ -6,20 +6,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        name: create_unlock_method
-        optional: true
-        sensitive: true
-      - id: 2
-        type: string
-        name: delete_unlock_method
-        optional: true
-      - id: 3
-        type: string
-        name: modify_unlock_method
-        optional: true
-        sensitive: true
       - id: 12
         type: integer
         name: unlock_fingerprint
@@ -85,25 +71,6 @@ entities:
             value: false
           - dps_val: false
             value: true
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_create
-      - id: 52
-        type: string
-        optional: true
-        name: temp_pwd_delete
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_modify
-      - id: 54
-        type: string
-        optional: true
-        sensitive: true
-        name: sync_method
       - id: 55
         type: integer
         name: unlock_temp_pwd
@@ -124,10 +91,6 @@ entities:
         type: integer
         optional: true
         persist: false
-      - id: 64
-        type: string
-        optional: true
-        name: pwd_offline_time
       - id: 67
         type: base64
         optional: true
@@ -147,11 +110,6 @@ entities:
         optional: true
         sensitive: true
         name: ble_unlock_check
-      - id: 73
-        type: base64
-        optional: true
-        sensitive: true
-        name: remote_pd_setkey_check
       - id: 74
         type: base64
         optional: true
@@ -332,3 +290,101 @@ entities:
             value: Clockwise
           - dps_val: anticlockwise
             value: Anti-clockwise
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 73
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        name: value
+        optional: true
+        sensitive: true
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 52
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      - id: 53
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      - id: 64
+        type: string
+        optional: true
+        name: value

+ 55 - 20
custom_components/tuya_local/devices/raykube_a1promax_lock.yaml

@@ -6,18 +6,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        optional: true
-        name: unlock_method_create
-      - id: 2
-        type: string
-        optional: true
-        name: unlock_method_delete
-      - id: 3
-        type: string
-        optional: true
-        name: unlock_method_modify
       - id: 16
         type: integer
         optional: true
@@ -39,10 +27,6 @@ entities:
         type: boolean
         name: open
         readonly: true
-      - id: 54
-        type: string
-        optional: true
-        name: sync_method
       - id: 61
         type: base64
         optional: true
@@ -73,10 +57,6 @@ entities:
         type: string
         optional: true
         name: unlock_record_check
-      - id: 73
-        type: string
-        optional: true
-        name: remote_pd_setkey_check
   - entity: sensor
     class: battery
     category: diagnostic
@@ -175,3 +155,58 @@ entities:
       - id: 78
         type: boolean
         name: switch
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 73
+        type: string
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value

+ 118 - 49
custom_components/tuya_local/devices/xcase_nx4964_lockbox.yaml

@@ -6,20 +6,6 @@ products:
 entities:
   - entity: lock
     dps:
-      - id: 1
-        type: string
-        optional: true
-        sensitive: true
-        name: unlock_method_create
-      - id: 2
-        type: string
-        optional: true
-        name: unlock_method_delete
-      - id: 3
-        type: string
-        optional: true
-        sensitive: true
-        name: unlock_method_modify
       - id: 13
         type: integer
         optional: true
@@ -35,25 +21,6 @@ entities:
         optional: true
         persist: false
         name: unlock_ble
-      - id: 51
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_create
-      - id: 52
-        type: string
-        optional: true
-        name: temp_pwd_delete
-      - id: 53
-        type: string
-        optional: true
-        sensitive: true
-        name: temp_pwd_modify
-      - id: 54
-        type: string
-        optional: true
-        sensitive: true
-        name: sync_method
       - id: 55
         type: integer
         optional: true
@@ -74,17 +41,6 @@ entities:
         optional: true
         persist: false
         name: unlock_voice
-      - id: 64
-        type: string
-        name: password_offline_time
-      - id: 65
-        type: string
-        optional: true
-        name: offline_clear_single
-      - id: 66
-        type: string
-        optional: true
-        name: offline_clear
       - id: 67
         type: string
         optional: true
@@ -108,11 +64,6 @@ entities:
         optional: true
         sensitive: true
         name: general_unlock_check
-      - id: 73
-        type: string
-        optional: true
-        sensitive: true
-        name: remote_pd_setkey_check
   - entity: sensor
     class: battery
     dps:
@@ -163,3 +114,121 @@ entities:
             value: shock
           - dps_val: defense
             value: defense
+  - entity: text
+    name: Remote unlock code
+    category: config
+    icon: "mdi:form-textbox-password"
+    hidden: true
+    dps:
+      - id: 73
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New credential
+    category: config
+    icon: "mdi:card-plus"
+    hidden: true
+    dps:
+      - id: 1
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete credential
+    category: config
+    icon: "mdi:card-minus"
+    hidden: true
+    dps:
+      - id: 2
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify credential
+    category: config
+    icon: "mdi:credit-card-edit"
+    hidden: true
+    dps:
+      - id: 3
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: New temp password
+    category: config
+    icon: "mdi:lock-open-plus"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Delete temp password
+    category: config
+    icon: "mdi:lock-open-minus"
+    hidden: true
+    dps:
+      - id: 52
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Modify temp password
+    category: config
+    icon: "mdi:pencil-lock"
+    hidden: true
+    dps:
+      - id: 53
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Sync credentials
+    category: config
+    icon: "mdi:lock-reset"
+    hidden: true
+    dps:
+      - id: 54
+        type: base64
+        optional: true
+        sensitive: true
+        name: value
+  - entity: text
+    name: Offline password timestamp
+    category: config
+    icon: "mdi:clock-digital"
+    hidden: true
+    dps:
+      - id: 64
+        type: string
+        optional: true
+        name: value
+  - entity: sensor
+    name: Used offline password
+    category: diagnostic
+    hidden: true
+    dps:
+      - id: 65
+        type: base64
+        optional: true
+        sensitive: true
+        name: sensor
+  - entity: sensor
+    name: Cleared offline passwords
+    category: diagnostic
+    hidden: true
+    dps:
+      - id: 66
+        type: base64
+        optional: true
+        sensitive: true
+        name: sensor

+ 11 - 0
tests/devices/test_ailrinni_fplock.py

@@ -35,6 +35,17 @@ class TestAilrinniFingerprintLock(TuyaDeviceTestCase):
             [
                 "sensor_alert",
                 "number_lock_volume",
+                "text_remote_unlock_code",
+                "text_new_credential",
+                "text_delete_credential",
+                "text_modify_credential",
+                "text_new_temp_password",
+                "text_delete_temp_password",
+                "text_modify_temp_password",
+                "text_sync_credentials",
+                "text_offline_password_timestamp",
+                "sensor_used_offline_password",
+                "sensor_cleared_offline_passwords",
             ]
         )