ソースを参照

feat (devices): add Kishin BS-DW002 motion sensor

Issue #4259
Jason Rumney 2 週間 前
コミット
da7660655b

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -1076,7 +1076,7 @@ Further device support has been made with the assistance of users. Please consid
 - [Veuchez](https://github.com/Veuchez) for assisting with support for Ryakka 7-in-1 pool monitor.
 - [banemonster](https://github.com/banemonster) for contributing support for Neopower Black Diamond all-in-one heat pump water heater.
 - [ajpohv](https://github.com/ajpohv) for contributing support for Qlima D720 dehumidifier.
-- [sport80](https://github.com/sport80) for assisting with support for Ettroit LN4102 thermostat.
+- [sport80](https://github.com/sport80) for assisting with support for Ettroit LN4102 thermostat, Kishin BS-DW002 motion sensor.
 - [norb-HB](https://github.com/norb-HB) for assisting with support for Boundless Brothers PA-210W gas alarm.
 - [arsenicks](https://github.com/arsenicks) for contributing support for iHseno human presence sensor.
 - [diegaccio](https://github.com/diegaccio) for contributing improvements for Beok TGM50-WPB-WF / M5-G2 variants.

+ 1 - 0
DEVICES.md

@@ -1166,6 +1166,7 @@ port and password.
 - idoo Smart Bloom 8 hydroponic system
 - Immax Neo Lite 7-in-1 weather station
 - Inkbird PTH-9CW air quality monitor
+- Kishin BS-DW002 motion sensor (sold under various brands)
 - KKMoon 7in1 air quality monitor
 - Kogan bidet toilet seat
 - Kogan KAWHTNOSLPA white noise sleep aid

+ 31 - 0
custom_components/tuya_local/devices/kishin_bsdw002_motionsensor.yaml

@@ -0,0 +1,31 @@
+name: Motion sensor
+products:
+  - id:
+    manufacturer: Kishin
+    model: BS-DW002
+entities:
+  - entity: binary_sensor
+    class: motion
+    category: diagnostic
+    dps:
+      - id: 1
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: pir
+            value: true
+          - value: false
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 3
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: low
+            value: 20
+          - dps_val: middle
+            value: 50
+          - dps_val: high
+            value: 80