Răsfoiți Sursa

Door peephole camera: add compatibility with more cameras

Issue #2978

Has additional indicator light switch, reset, and alarm and "initiative"
notifications not present on the original device.

But since cameras mostly follow the same dp layout, avoid growing the number
of configs to handle minor variations by adding these optional extra entities
(events should not cause any issue if they never send anything, light can be
hidden if not present, reset button can be hidden by default).
Jason Rumney 9 luni în urmă
părinte
comite
916d6eb374

+ 58 - 0
custom_components/tuya_local/devices/door_peephole_camera.yaml

@@ -145,3 +145,61 @@ entities:
         type: base64
         name: image_details
         optional: true
+  - entity: light
+    translation_key: indicator
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 101
+        type: boolean
+        optional: true
+        name: switch
+      - id: 101
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: event
+    name: Alarm
+    category: diagnostic
+    dps:
+      - id: 185
+        type: string
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: triggered
+      - id: 185
+        type: string
+        optional: true
+        name: message
+  - entity: event
+    name: Notification
+    category: diagnostic
+    dps:
+      - id: 212
+        type: string
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: message
+      - id: 212
+        type: string
+        optional: true
+        name: message
+  - entity: button
+    class: restart
+    category: config
+    hidden: true
+    dps:
+      - id: 162
+        type: boolean
+        optional: true
+        name: button