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

Add support for KW02 video doorbell

Issue #2058
Jason Rumney 1 год назад
Родитель
Сommit
786cd7f1fa

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -618,3 +618,4 @@ Further device support has been made with the assistance of users. Please consid
 - [DefinitelyADev](https://github.com/DefinitelyADev) for assisting with support for Moes zigbee dual dimmer module.
 - [daubman](https://github.com/daubman) for contributing support for Vevor Level 2 EV charger.
 - [Blcktape](https://github.com/Blcktape) for contributing support for Ion LED WiFi dimmer.
+- [dobriys](https://github.com/dobriys) for assisting with support for KW02 video doorbell.

+ 2 - 1
DEVICES.md

@@ -627,13 +627,14 @@ work reliably, even if listed below.
 
 ### Sirens
 
-- Iebeyond ECH doorbell with 433MHz RF hub
 - Neo Coolcam Siren with temperature and humidity alert (NAS-AB02W)
 - Orion Grid Connect outdoor siren (also Elesion NX-4980)
 - Sirena WS-902 Plus outdoor strobe siren
 
 ### Doorbells
 
+- Iebeyond ECH doorbell with 433MHz RF hub
+- KW02 video doorbell
 - WHM-04 doorbell (sold under various brands)
 
 ### Cameras

+ 152 - 0
custom_components/tuya_local/devices/kw02_video_doorbell.yaml

@@ -0,0 +1,152 @@
+name: Doorbell
+products:
+  - id: 0ukszkfaejkqpz9o
+    name: KW02 IP video doorbell
+primary_entity:
+  entity: siren
+  name: Doorbell
+  dps:
+    - id: 156
+      type: string
+      optional: true
+      name: tone
+      mapping:
+        - dps_val: "1"
+          value: Tone 1
+        - dps_val: "2"
+          value: Tone 2
+        - dps_val: "3"
+          value: Tone 3
+        - dps_val: "4"
+          value: Tone 4
+    - id: 157
+      type: integer
+      optional: true
+      name: volume_level
+      range:
+        min: 0
+        max: 10
+      mapping:
+        - scale: 10
+    - id: 166
+      type: integer
+      optional: true
+      name: duration
+      range:
+        min: 5
+        max: 60
+    - id: 186
+      type: string
+      optional: true
+      name: alarm_report
+secondary_entities:
+  - entity: light
+    translation_key: indicator
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Flip image
+    icon: "mdi:flip-horizontal"
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        optional: true
+        name: switch
+  - entity: select
+    name: Motion sensitivity
+    icon: "mdi:motion"
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: "0"
+            value: Low
+          - dps_val: "1"
+            value: Medium
+          - dps_val: "2"
+            value: High
+  - entity: button
+    name: SD format
+    icon: "mdi:sd"
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        optional: true
+        name: button
+      - id: 109
+        type: string
+        optional: true
+        name: capacity
+      - id: 110
+        type: integer
+        optional: true
+        name: sd_status
+      - id: 117
+        type: integer
+        optional: true
+        name: formatting_status
+  - entity: camera
+    dps:
+      - id: 115
+        type: base64
+        optional: true
+        name: motion_detected
+      - id: 134
+        type: boolean
+        optional: true
+        name: motion_enable
+      - id: 154
+        type: base64
+        optional: true
+        name: snapshot
+        mapping:
+          - dps_val: null
+            value_redirect: motion_detected
+  - entity: event
+    class: doorbell
+    dps:
+      - id: 136
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: ""
+            value: null
+          - dps_val: null
+            value: null
+          - value: ring
+      - id: 136
+        type: string
+        optional: true
+        name: raw_event
+  - entity: number
+    name: Volume
+    category: config
+    icon: "mdi:volume-high"
+    dps:
+      - id: 160
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 1
+          max: 10
+        mapping:
+          - scale: 0.1
+  - entity: button
+    class: restart
+    category: config
+    dps:
+      - id: 162
+        type: boolean
+        optional: true
+        name: button

+ 2 - 0
custom_components/tuya_local/devices/rl_video_lock.yaml

@@ -42,4 +42,6 @@ secondary_entities:
         mapping:
           - dps_val: ""
             value: null
+          - dps_val: null
+            value: null
           - value: ring