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

feat(devices): add support for Brilliant Smart PIR outdoor sensor switch

Issue #3656
Jason Rumney 4 месяцев назад
Родитель
Сommit
2d4610dd59

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1054,3 +1054,4 @@ Further device support has been made with the assistance of users. Please consid
 - [rachinibop](https://github.com/rachinibop) for assisting with support for SunnyBot plant light.
 - [chucknorris101](https://github.com/chucknorris101) for assisting with support for Alen Breathesmart 45i air purifier.
 - [ffonte](https://github.com/ffonte) for assisting with support for Proscenic 850T robot vacuum.
+- [Shmob1](https://github.com/Shmob1) for assisting with support for Brilliant Smart PIR outdoor sensor.

+ 1 - 0
DEVICES.md

@@ -693,6 +693,7 @@ of device.
 - Atomi smart color string light
 - Blitzwolf BW-LT31 LED strip
 - Brilliant Smart 22W twin flood lights with motion sensor
+- Brilliant Smart PIR outdoor sensor light switch
 - Brizlabs string lights
 - Calex S45 Clear E27 lightbulb
 - Deltaco LED Strip (SH-LW5M)

+ 75 - 0
custom_components/tuya_local/devices/brilliant_outdoor_pirswitch.yaml

@@ -0,0 +1,75 @@
+name: PIR switch
+products:
+  - id: kwkq8icRxCrxXEAC
+    manufacturer: Brilliant Smart
+    model: PIR outdoor sensor
+entities:
+  - entity: light
+    icon: "mdi:light-flood-down"
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+  - entity: number
+    name: Daylight threshold
+    class: illuminance
+    category: config
+    icon: "mdi:theme-light-dark"
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: lx
+        range:
+          min: 0
+          max: 2000
+  - entity: number
+    class: duration
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 10
+          max: 600
+  - entity: select
+    name: Operation mode
+    category: config
+    dps:
+      - id: 104
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: auto
+            icon: "mdi:motion-sensor"
+          - dps_val: "1"
+            value: "on"
+            icon: "mdi:motion-sensor-off"
+          - dps_val: "2"
+            value: flash
+            icon: "mdi:flash"
+  - entity: select
+    name: Sensitivity
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: low
+          - dps_val: "1"
+            value: medium
+          - dps_val: "2"
+            value: high
+  - entity: binary_sensor
+    class: motion
+    category: diagnostic
+    dps:
+      - id: 108
+        type: boolean
+        name: sensor