Browse Source

Add support for Raykube A1 Pro Max door lock

Issue #2439
Jason Rumney 1 năm trước cách đây
mục cha
commit
914292716a

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -731,3 +731,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Esp32-zapper](https://github.com/Esp32-zapper) for assisting with support for HunterTBK video doorbell.
 - [masfernandez](https://github.com/masfernandez) for assisting with support for Create Warm Towel Advance bathroom heater.
 - [Smandurlo](https://github.com/Smandurlo) for assisting with support for Klarstein Amazonia dishwasher and Weaja gas alarm.
+- [ChrisDes](https://github.com/ChrisDes) for assisting with support for Raykube A1 Pro Max clip-over door lock.

+ 1 - 0
DEVICES.md

@@ -884,6 +884,7 @@ port and password.
 - Orion DL021HA lock
 - O'TU R1O1 fingerprint door lock
 - PT216/PT19DB-2 temperature and humidity sensor
+- Raykube A1 Pro Max clip over door lock
 - SGS01 plant sensor
 - Smart Ape solar garden light
 - SOP10 water sprinkler

+ 175 - 0
custom_components/tuya_local/devices/raykube_a1promax_lock.yaml

@@ -0,0 +1,175 @@
+name: Door lock
+products:
+  - id: rlyxv7pe
+    name: Raykube A1 Pro Max
+primary_entity:
+  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
+      persist: false
+      name: unlock_key
+    - id: 19
+      type: integer
+      optional: true
+      persist: false
+      name: unlock_ble
+    - id: 20
+      type: string
+      optional: true
+      name: lock_record
+    - id: 46
+      type: boolean
+      name: lock
+    - id: 47
+      type: boolean
+      name: open
+      readonly: true
+    - id: 54
+      type: string
+      optional: true
+      name: sync_method
+    - id: 61
+      type: string
+      optional: true
+      name: remote_no_dp_key
+    - id: 62
+      type: integer
+      optional: true
+      persist: false
+      name: unlock_app
+    - id: 63
+      type: integer
+      optional: true
+      persist: false
+      name: unlock_voice
+    - id: 69
+      type: string
+      optional: true
+      name: record
+    - id: 70
+      type: string
+      optional: true
+      name: check_code_set
+    - id: 71
+      type: string
+      optional: true
+      name: ble_unlock_check
+    - id: 72
+      type: string
+      optional: true
+      name: unlock_record_check
+    - id: 73
+      type: string
+      optional: true
+      name: remote_pd_setkey_check
+secondary_entities:
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 9
+        type: string
+        name: sensor
+        unit: "%"
+        mapping:
+          - dps_val: high
+            value: 90
+          - dps_val: medium
+            value: 60
+          - dps_val: low
+            value: 30
+          - dps_val: poweroff
+            value: 0
+  - entity: event
+    name: Alert
+    dps:
+      - id: 21
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: low_battery
+            value: low_battery
+          - dps_val: power_off
+            value: power_off
+  - entity: switch
+    translation_key: keytone
+    category: config
+    dps:
+      - id: 31
+        type: string
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: normal
+            value: true
+          - dps_val: mute
+            value: false
+  - entity: switch
+    name: Auto-lock
+    icon: "mdi:lock-clock"
+    category: config
+    dps:
+      - id: 33
+        type: boolean
+        name: switch
+  - entity: number
+    name: Auto lock time
+    category: config
+    icon: "mdi:lock-clock"
+    dps:
+      - id: 36
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 1
+          max: 1800
+  - entity: button
+    name: Sync clock
+    icon: "mdi:clock"
+    category: config
+    dps:
+      - id: 44
+        type: boolean
+        name: button
+        optional: true
+  - entity: select
+    name: Special function
+    icon: "mdi:function"
+    category: config
+    dps:
+      - id: 68
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: function1
+            value: Function 1
+          - dps_val: function2
+            value: Function 2
+          - dps_val: function3
+            value: Function 3
+          - dps_val: function4
+            value: Function 4
+  - entity: switch
+    name: Special control
+    category: config
+    dps:
+      - id: 78
+        type: boolean
+        name: switch