Procházet zdrojové kódy

Add files via upload

PIR sensor with alarm functionality
EmilianoMorello před 1 rokem
rodič
revize
9585c2ace7

+ 69 - 0
custom_components/tuya_local/devices/pir_sensor_alarm.yaml

@@ -0,0 +1,69 @@
+name: PIR sensor alarm
+products:
+  - id: y5tdmwmb2ieknmkb
+entities:
+  - entity: binary_sensor
+    translation_key: motion
+    class: motion 
+    dps:
+      - id: 1 
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: pir
+            value: true
+          - dps_val: "none"
+            value: false
+  - entity: switch
+    name: Armed
+    icon: "mdi:shield-home"
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    translation_key: charge_energy
+    class: plug
+    category: diagnostic
+    dps:
+      - id: 103
+        type: boolean
+        name: sensor
+  - entity: sensor
+    translation_key: battery_level
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 4
+        type: integer
+        name: sensor
+        unit: "%"
+  - entity: number
+    name: Alarm time
+    category: config
+    icon: "mdi:alarm"
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 255
+  - entity: select
+    name:  Warning mode
+    icon: "mdi:cog"
+    category: config
+    dps:
+      - id: 105
+        type: string
+        name: option
+        mapping:
+          - dps_val: "SoundLight_mode"
+            value: "Sound and Light"
+          - dps_val: "OnlyLight_mode"
+            value: "Only Light"
+          - dps_val: "OnlySound_mode"
+            value: "Only Sound"
+          - dps_val: "Mute_mode"
+            value: "No Sound no Light"