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

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 10 месяцев назад
Родитель
Сommit
916d6eb374
1 измененных файлов с 58 добавлено и 0 удалено
  1. 58 0
      custom_components/tuya_local/devices/door_peephole_camera.yaml

+ 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