Sfoglia il codice sorgente

feat (devices): add Neptun Smart+ water leak control system

Basic items only, there are a lot of undocumented raw data dps, and
dps with cryptic names that were omitted.

Issue #4263
Jason Rumney 2 settimane fa
parent
commit
082aa3eaae

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1229,3 +1229,4 @@ Further device support has been made with the assistance of users. Please consid
 - [drkn](https://github.com/drkn) for contributing support for Eberg HUMI humidifier.
 - [pacopaues](https://github.com/pacopaues) for assisting with support for RTI-Tek T5Z and Avatto ZWT198 thermostats.
 - [ivan-mendez](https://github.com/ivan-mendez) for assisting with support for Brokton BRST12 air conditioner.
+- [sanglyb](https://github.com/sanglyb) for assisting with support for Neptun Smart+ water leak control system.

+ 1 - 1
DEVICES.md

@@ -1117,7 +1117,7 @@ port and password.
 - Holman WX8 8 sprinkler irrigation controller
 - KRain KRX8 irrigation controller
 - Neo NAS-WV02W water use monitoring valve
-- Neptun Smart water leak control system
+- Neptun Smart and Smart+ water leak control systems
 - Qoto 03 smart water valve / sprinkler controller
 - Qoto 05 smart water valve / sprinkler controller
 - SH07-8 / SH07S-TY smart sprinkler controller (sold as Aquarobo, Leictory LK06 and other brands)

+ 106 - 0
custom_components/tuya_local/devices/neptun_smartplus_waterleak.yaml

@@ -0,0 +1,106 @@
+name: Water leak detector
+products:
+  - id: fbewfxzogbzphuy3
+    manufacturer: Neptun
+    model: Smart+
+entities:
+  - entity: binary_sensor
+    class: moisture
+    dps:
+      - id: 1
+        type: boolean
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 3
+        type: string
+        optional: true
+        name: sensor
+        unit: "%"
+        mapping:
+          - dps_val: low
+            value: 20
+          - dps_val: middle
+            value: 50
+          - dps_val: high
+            value: 80
+  - entity: button
+    name: Mute
+    icon: "mdi:volume-mute"
+    dps:
+      - id: 7
+        type: boolean
+        optional: true
+        name: button
+  - entity: siren
+    category: config
+    dps:
+      - id: 8
+        type: integer
+        optional: true
+        name: volume_level
+        mapping:
+          - dps_val: mute
+            value: 0.0
+          - dps_val: low
+            value: 0.33
+          - dps_val: middle
+            value: 0.66
+          - dps_val: high
+            value: 1.0
+      - id: 141
+        type: integer
+        name: duration
+        range:
+          min: 0
+          max: 255
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        optional: true
+        name: lock
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 119
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 119
+        type: bitfield
+        name: fault_code
+      - id: 121
+        type: base64
+        name: serial_number
+      - id: 139
+        type: integer
+        name: line_sensor_errors
+      - id: 140
+        type: integer
+        name: error_code
+  - entity: event
+    name: Notification
+    dps:
+      - id: 120
+        type: boolean
+        optional: true
+        name: event
+        mapping:
+          - dps_val: true
+            value: alert
+          - dps_val: false
+            value: cleared