Преглед изворни кода

feat(devices): add support for Haozee RB-SRAIN01 rain sensor

Issue #3529
Jason Rumney пре 5 месеци
родитељ
комит
aec00b01a5

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1021,3 +1021,4 @@ Further device support has been made with the assistance of users. Please consid
 - [FritzeF](https://github.com/FritzeF) for assisting with support for Kavunion C1 100 ventilation fan.
 - [StaRipper](https://github.com/StaRipper) for assisting with support for Pinjia PJ3101A human presence sensor.
 - [pbassut](https://github.com/pbassut) for contributing improvements to AGL Ultra Magic lock.
+- [Zxwcount](https://github.com/Zxwcount) for assisting with support for Haozee RB-SRAIN01 rain sensor.

+ 1 - 0
DEVICES.md

@@ -1117,6 +1117,7 @@ entity types as sub devices.
 - Aubess temperature and humidity sensor
 - Avatto TRV06 radiator valve (also sold branded as Thaleos)
 - Generic Zigbee Door Sensor
+- Haozee RB-SRAIN01 solar rain sensor
 - Haozee ZG-302ZM mmWave presence dual light switch
 - Intelbras IFR7000 door lock
 - Loginovo mmWave human presence sensor

+ 63 - 0
custom_components/tuya_local/devices/haozee_rbsrain01_rainsensor.yaml

@@ -0,0 +1,63 @@
+name: Rain sensor
+# products:
+#   - id: UNKNOWN
+#     manufacturer: Haozee?
+#     model: RB-SRAIN01
+entities:
+  - entity: binary_sensor
+    class: moisture
+    dps:
+      - id: 1
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 4
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    class: voltage
+    name: Solar intensity
+    category: diagnostic
+    dps:
+      - id: 101
+        type: integer
+        name: sensor
+        unit: mV
+        class: measurement
+      - id: 102
+        type: integer
+        name: average
+      - id: 103
+        type: integer
+        name: peak
+  - entity: event
+    name: Cleaning
+    dps:
+      - id: 104
+        type: boolean
+        name: event
+        optional: true
+        mapping:
+          - dps_val: true
+            value: need_clean
+          - dps_val: false
+            value: is_clean
+  - entity: sensor
+    name: Rain sensor
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 105
+        type: integer
+        name: sensor
+        unit: mV
+        class: measurement