Przeglądaj źródła

feat: add support for Moes human presence sensor

Issue #3421
Jason Rumney 7 miesięcy temu
rodzic
commit
3b3307d711

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -994,3 +994,4 @@ Further device support has been made with the assistance of users. Please consid
 - [mikeblackk](https://github.com/mikeblackk) for assisting with support for Madimack Elite V4 pool heat pump.
 - [vincedarley](https://github.com/vincedarley) for assisting with support for a second variant of Chanfok ceiling fan and light.
 - [happy-daisy](https://github.com/happy-daisy) for assisting with support for Beca BHT-12 thermostat smartplug.
+- [nhadpck](https://github.com/nhadpck) for assisting with support for Moes human presence sensor.

+ 1 - 0
DEVICES.md

@@ -999,6 +999,7 @@ port and password.
 - Mayborn GroClock Connect sleep training alarm clock (also sold under Tommee Tippee and other brands)
 - ME201W level sensor
 - Mirabella Genio motion sensor
+- Moes human presence sensor
 - Momcozy white noise machine (2 variants)
 - Mustool MT15/MT29 air quality box
 - Nedis WIFIPD10WT pill dispenser

+ 116 - 0
custom_components/tuya_local/devices/moes_presencesensor.yaml

@@ -0,0 +1,116 @@
+name: Presence sensor
+# products:
+#   - id: UNKNOWN
+#     manufacturer: Moes
+#     model: WSS-QY-HP-MS
+entities:
+  - entity: binary_sensor
+    class: occupancy
+    dps:
+      - id: 1
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: presence
+            value: true
+          - value: false
+      - id: 6
+        type: string
+        name: selftest_result
+  - entity: number
+    name: Sensitivity
+    category: config
+    icon: "mdi:motion-sensor"
+    dps:
+      - id: 2
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 9
+  - entity: number
+    name: Minimum distance
+    category: config
+    class: distance
+    dps:
+      - id: 3
+        type: integer
+        name: value
+        unit: m
+        range:
+          min: 0
+          max: 950
+        mapping:
+          - scale: 100
+  - entity: number
+    name: Maximum distance
+    category: config
+    class: distance
+    dps:
+      - id: 4
+        type: integer
+        name: value
+        unit: m
+        range:
+          min: 0
+          max: 950
+        mapping:
+          - scale: 100
+  - entity: number
+    name: Detect delay
+    class: duration
+    category: config
+    icon: "mdi:camera-timer"
+    dps:
+      - id: 101
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 500
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Clear delay
+    class: duration
+    category: config
+    icon: "mdi:camera-timer"
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 15000
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: illuminance
+    dps:
+      - id: 104
+        type: integer
+        name: sensor
+        unit: lx
+        class: measurement
+  - entity: number
+    name: Identify level
+    category: config
+    dps:
+      - id: 107
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 3
+  - entity: number
+    name: Trigger level
+    category: config
+    dps:
+      - id: 108
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 3