Kaynağa Gözat

Add support for BSTUOKEY invisible door lock

Issue #2111
Jason Rumney 1 yıl önce
ebeveyn
işleme
9a59ab428b

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -641,3 +641,4 @@ Further device support has been made with the assistance of users. Please consid
 - [David-Eilers](https://github.com/David-Eilers) for contributing support for Calex S45 Clear E27 lightbulb.
 - [David-Eilers](https://github.com/David-Eilers) for contributing support for Calex S45 Clear E27 lightbulb.
 - [pelle2011](https://github.com/pelle2011) for contributing support for AquaForte Inverter VSP pool pump.
 - [pelle2011](https://github.com/pelle2011) for contributing support for AquaForte Inverter VSP pool pump.
 - [tv4you2016](https://github.com/tv4you2016) for contributing support for Cecotec ForceClima Soundless air conditioner.
 - [tv4you2016](https://github.com/tv4you2016) for contributing support for Cecotec ForceClima Soundless air conditioner.
+- [danieljohngomez](https://github.com/danieljohngomez) for assisting with support for BSTUOKEY invisible door lock.

+ 1 - 0
DEVICES.md

@@ -779,6 +779,7 @@ port and password.
 - Adaprox Fingerbot plus
 - Adaprox Fingerbot plus
 - Ailrinni fingerprint door lock
 - Ailrinni fingerprint door lock
 - Arlec smart button
 - Arlec smart button
+- BSTUOKEY Invisible induction door lock
 - Diivoo DWV010 dual water timer
 - Diivoo DWV010 dual water timer
 - Diivoo WT05 dual water timer
 - Diivoo WT05 dual water timer
 - Gainsborough Liberty entrance lock
 - Gainsborough Liberty entrance lock

+ 154 - 0
custom_components/tuya_local/devices/bstuokey_invisible_lock.yaml

@@ -0,0 +1,154 @@
+name: Door lock
+products:
+  - id: kpn4zaf7
+    name: BSTUOKEY RX2052 invisible induction lock
+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: 15
+      type: integer
+      optional: true
+      name: unlock_card
+    - id: 19
+      type: integer
+      optional: true
+      name: unlock_ble
+    - id: 21
+      type: string
+      optional: true
+      name: jammed
+      mapping:
+        - dps_val: tongue_bad
+          value: true
+        - dps_val: tongue_not_out
+          value: true
+        - value: false
+    - id: 47
+      type: boolean
+      readonly: true
+      name: lock
+    - id: 54
+      type: string
+      optional: true
+      name: synch_method
+    - id: 70
+      type: string
+      optional: true
+      name: check_code_set
+    - id: 71
+      type: string
+      optional: true
+      name: ble_unlock_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: sensor
+    name: Alert
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 21
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: null
+            value: ok
+          - dps_val: wrong_finger
+            value: wrong_finger
+          - dps_val: wrong_password
+            value: wrong_password
+          - dps_val: wrong_card
+            value: wrong_card
+          - dps_val: wrong_face
+            value: wrong_face
+          - dps_val: tongue_bad
+            value: tongue_bad
+          - dps_val: too_hot
+            value: too_hot
+          - dps_val: unclosed_time
+            value: unclosed_time
+          - dps_val: tongue_not_out
+            value: tongue_not_out
+          - dps_val: pry
+            value: pry
+          - dps_val: key_in
+            value: key_in
+          - dps_val: low_battery
+            value: low_battery
+          - dps_val: power_off
+            value: power_off
+          - dps_val: shock
+            value: shock
+          - dps_val: defense
+            value: defense
+          - dps_val: wrong_unlock
+            value: wrong_unlock
+  - entity: select
+    name: Language
+    icon: "mdi:translate"
+    category: config
+    dps:
+      - id: 28
+        type: string
+        name: option
+        mapping:
+          - dps_val: chinese_simplified
+            value: 中文
+          - dps_val: english
+            value: English
+  - entity: number
+    name: Beep volume
+    category: config
+    icon: "mdi:volume-high"
+    dps:
+      - id: 31
+        type: string
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - dps_val: mute
+            value: 0
+            step: 33
+            icon: "mdi:volume-mute"
+          - dps_val: low
+            value: 33
+            step: 33
+            icon: "mdi:volume-low"
+          - dps_val: normal
+            value: 66
+            step: 33
+            icon: "mdi:volume-medium"
+          - dps_val: high
+            value: 100
+            step: 33