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

Add support for Deta motion lights.

Issue #282

- also fixed some product definitions in Avatto roller blinds, Simple dual
  switch with timer and WiStar roller blinds.
Jason Rumney 3 лет назад
Родитель
Сommit
3eed5aad9c

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -142,3 +142,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [raphaeleduardo42](https://github.com/raphaeleduardo42) for assistance supporting AGL Ultramagic locks.
 - [EnginDzhemil](https://github.com/EnginDzhemil) for contributing support for single switches with backlight.
 - [billxinli](https://github.com/billxinli) for contributing support for Honeywell TP dehumidifiers.
+- [isarib01](https://github.com/isarib01) for assistance supporting Deta motion sensor lights.

+ 1 - 0
DEVICES.md

@@ -187,6 +187,7 @@ Other brands may work with the above configurations
 - Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also). Two versions - with and without scene/music modes and timer.
 - Atomi smart color string light
 - Screen sync smart light 2.0
+- Deta motion sensor lights (DET100HA/DET102HA)
 
 ### Covers
 

+ 1 - 1
custom_components/tuya_local/devices/avatto_roller_blinds.yaml

@@ -1,5 +1,5 @@
 name: Avatto roller blinds
-product:
+products:
   - id: 3r8gc33pnqsxfe1g
 primary_entity:
   entity: cover

+ 68 - 0
custom_components/tuya_local/devices/motion_sensor_light.yaml

@@ -0,0 +1,68 @@
+name: Motion Sensor Light
+products:
+  - id: oapo5mmfbcr2y7ox
+    name: Deta 360 Motion Sensor
+  - id: 8mrw54ape8opgl69
+    name: Deta Light Motion Sensor
+primary_entity:
+  entity: light
+  dps:
+    - id: 101
+      type: string
+      name: effect
+      mapping:
+        - dps_val: mode_off
+          value: "Off"
+        - dps_val: mode_auto
+          value: Auto
+        - dps_val: mode_on
+          value: "On"
+    - id: 102
+      type: boolean
+      name: switch
+secondary_entities:
+  - entity: number
+    name: Sensitivity
+    icon: "mdi:human-greeting-proximity"
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 100
+  - entity: number
+    name: Duration
+    icon: "mdi:camera-timer"
+    category: config
+    dps:
+      - id: 104
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 900
+        mapping:
+          - step: 10
+  - entity: number
+    name: Light Level
+    icon: "mdi:theme-light-dark"
+    category: config
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: lx
+        range:
+          min: 3
+          max: 2000
+  - entity: binary_sensor
+    name: Detect
+    category: diagnostic
+    class: presence
+    dps:
+      - id: 106
+        type: boolean
+        name: sensor

+ 1 - 1
custom_components/tuya_local/devices/simple_dual_switch_timer.yaml

@@ -1,5 +1,5 @@
 name: Dual switch with timers
-product:
+products:
   - id: key9nfnyp89j4esc
 primary_entity:
   entity: switch

+ 1 - 1
custom_components/tuya_local/devices/wistar_roller_blind.yaml

@@ -1,5 +1,5 @@
 name: Wistar roller blinds
-product:
+products:
   - id: c4hBLohzUgxULw5a
 primary_entity:
   entity: cover