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

Bcom intercom camera: add product id, and doorbell event

- add proper product id (previous one looked like a device id)
- mark most dps optional. Original report had no dps logged, new issue
  has only dp 101.
- use dp 154 for doorbell pic, and make new doorbell event for dp 136.

Issue #2835
Jason Rumney 1 год назад
Родитель
Сommit
d98aea8a32
1 измененных файлов с 30 добавлено и 2 удалено
  1. 30 2
      custom_components/tuya_local/devices/bcom_intercom_camera.yaml

+ 30 - 2
custom_components/tuya_local/devices/bcom_intercom_camera.yaml

@@ -1,6 +1,6 @@
 name: Doorbell
 name: Doorbell
 products:
 products:
-  - id: bf71b225dc6dd70835wlbt
+  - id: h3bhzu9m0ig80rdu
     manufacturer: Bcom
     manufacturer: Bcom
     model: Majic IPBox
     model: Majic IPBox
 entities:
 entities:
@@ -10,7 +10,7 @@ entities:
         name: record
         name: record
         type: boolean
         type: boolean
         optional: true
         optional: true
-      - id: 136
+      - id: 154
         name: snapshot
         name: snapshot
         type: base64
         type: base64
         persist: false
         persist: false
@@ -24,12 +24,14 @@ entities:
       - id: 115
       - id: 115
         name: motion_detected
         name: motion_detected
         type: base64
         type: base64
+        optional: true
         sensitive: true
         sensitive: true
   - entity: lock
   - entity: lock
     name: Door lock
     name: Door lock
     dps:
     dps:
       - id: 232
       - id: 232
         type: boolean
         type: boolean
+        optional: true
         name: lock
         name: lock
   - entity: light
   - entity: light
     translation_key: indicator
     translation_key: indicator
@@ -45,6 +47,7 @@ entities:
     dps:
     dps:
       - id: 103
       - id: 103
         type: boolean
         type: boolean
+        optional: true
         name: switch
         name: switch
   - entity: switch
   - entity: switch
     name: Watermark
     name: Watermark
@@ -53,6 +56,7 @@ entities:
     dps:
     dps:
       - id: 104
       - id: 104
         type: boolean
         type: boolean
+        optional: true
         name: switch
         name: switch
   - entity: select
   - entity: select
     name: Motion Detection
     name: Motion Detection
@@ -61,6 +65,7 @@ entities:
     dps:
     dps:
       - id: 106
       - id: 106
         type: string
         type: string
+        optional: true
         name: option
         name: option
         mapping:
         mapping:
           - dps_val: "0"
           - dps_val: "0"
@@ -76,6 +81,7 @@ entities:
     dps:
     dps:
       - id: 108
       - id: 108
         type: string
         type: string
+        optional: true
         name: option
         name: option
         mapping:
         mapping:
           - dps_val: "0"
           - dps_val: "0"
@@ -90,6 +96,7 @@ entities:
     dps:
     dps:
       - id: 109
       - id: 109
         type: string
         type: string
+        optional: true
         name: sensor
         name: sensor
   - entity: sensor
   - entity: sensor
     name: SD status
     name: SD status
@@ -97,6 +104,7 @@ entities:
     dps:
     dps:
       - id: 110
       - id: 110
         type: integer
         type: integer
+        optional: true
         name: sensor
         name: sensor
   - entity: button
   - entity: button
     name: SD format
     name: SD format
@@ -105,6 +113,7 @@ entities:
     dps:
     dps:
       - id: 111
       - id: 111
         type: boolean
         type: boolean
+        optional: true
         name: button
         name: button
   - entity: sensor
   - entity: sensor
     name: SD format state
     name: SD format state
@@ -112,6 +121,7 @@ entities:
     dps:
     dps:
       - id: 117
       - id: 117
         type: integer
         type: integer
+        optional: true
         name: sensor
         name: sensor
   - entity: select
   - entity: select
     name: Recording mode
     name: Recording mode
@@ -120,6 +130,7 @@ entities:
     dps:
     dps:
       - id: 151
       - id: 151
         type: string
         type: string
+        optional: true
         name: option
         name: option
         mapping:
         mapping:
           - dps_val: "1"
           - dps_val: "1"
@@ -132,6 +143,7 @@ entities:
     dps:
     dps:
       - id: 162
       - id: 162
         type: boolean
         type: boolean
+        optional: true
         name: button
         name: button
   - entity: sensor
   - entity: sensor
     name: Channel
     name: Channel
@@ -140,4 +152,20 @@ entities:
     dps:
     dps:
       - id: 231
       - id: 231
         type: string
         type: string
+        optional: true
         name: sensor
         name: sensor
+  - entity: event
+    class: doorbell
+    dps:
+      - id: 136
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - value: ring
+      - id: 136
+        type: string
+        optional: true
+        name: message