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

Add support for a PIR motion sensor.

Issue #632
Jason Rumney 2 лет назад
Родитель
Сommit
5a0bcd535e
3 измененных файлов с 27 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 25 0
      custom_components/tuya_local/devices/pir_sensor.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -246,3 +246,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Cyrelion](https://github.com/Cyrelion) for assisting with support for Lifubide X600 air purifiers.
 - [mwkchan](https://github.com/mwkchan) for assisting with support for Princess 350 panel heater.
 - [aletsweb](https://github.com/aletsweb) for assisting with support for A60 rgbcw lightbubs and Rinkmo D2 vacuums.
+- [FaboThePlayer](https://github.com/FaboThePlayer) for assisting with support for a whitelabel PIR motion sensor.

+ 1 - 0
DEVICES.md

@@ -346,6 +346,7 @@ of device.
 
 ### Miscellaneous
 
+- generic PIR motion sensor
 - Bresser smart 7-in-1 weather station
 - Catit Pixi smart fountain
 - Catit pet feeder (2.2kg dispenser and 6 meal versions)

+ 25 - 0
custom_components/tuya_local/devices/pir_sensor.yaml

@@ -0,0 +1,25 @@
+name: PIR sensor
+products:
+  - id: gaczanu8noooebfe
+primary_entity:
+  entity: binary_sensor
+  class: motion
+  dps:
+    - id: 1
+      type: string
+      name: sensor
+      mapping:
+        - dps_val: pir
+          value: true
+        - dps_val: "none"
+          value: false
+secondary_entities:
+  - entity: sensor
+    name: Battery
+    class: battery
+    dps:
+      - id: 4
+        type: integer
+        name: sensor
+        unit: "%"
+