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

Add support for EPT tank level sensor

Issue #1653

Fix indentation in smartcurtain_acs_wt.yaml
Jason Rumney 2 лет назад
Родитель
Сommit
7ddf44fd70

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -505,3 +505,4 @@ Further device support has been made with the assistance of users. Please consid
 - [xeroski](https://github.com/xeroski) for assisting with support for Kerui 200W and JS-P162 300W cameras.
 - [xeroski](https://github.com/xeroski) for assisting with support for Kerui 200W and JS-P162 300W cameras.
 - [dakker78](https://github.com/dakker78) for contributing support for Herschel IR heaters.
 - [dakker78](https://github.com/dakker78) for contributing support for Herschel IR heaters.
 - [liamlain](https://github.com/liamlain) for assisting with support for SmartCurtain curtains.
 - [liamlain](https://github.com/liamlain) for assisting with support for SmartCurtain curtains.
+- [legantois](https://github.com/legantois) for assisting with support for EPT tank level sensors.

+ 1 - 0
DEVICES.md

@@ -612,6 +612,7 @@ port and password.
 - CO2-Box air quality monitor
 - CO2-Box air quality monitor
 - CT20W PIR motion detector
 - CT20W PIR motion detector
 - Emax EM3378 Weather Station (selling as Hiper P1 and other rebrands)
 - Emax EM3378 Weather Station (selling as Hiper P1 and other rebrands)
+- EPT ultrasonic 3m tank level sensor
 - Garza Wi-Fi garden irrigation system (ITV103W with 433MHz WiFi hub)
 - Garza Wi-Fi garden irrigation system (ITV103W with 433MHz WiFi hub)
 - GratKit filament dryer
 - GratKit filament dryer
 - Haier Nayun NY-GS-04 combustible gas alarm
 - Haier Nayun NY-GS-04 combustible gas alarm

+ 99 - 0
custom_components/tuya_local/devices/ept_level_sensor.yaml

@@ -0,0 +1,99 @@
+name: Level sensor
+products:
+  - id: npfinze0zsvta7aj
+    name: EPT 3m ultrasonic
+primary_entity:
+  entity: sensor
+  name: Status
+  class: enum
+  dps:
+    - id: 1
+      type: string
+      name: sensor
+      mapping:
+        - dps_val: normal
+          value: normal
+        - dps_val: lower_alarm
+          value: low
+        - dps_val: upper_alarm
+          value: high
+secondary_entities:
+  - entity: sensor
+    name: Depth
+    class: distance
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: m
+        class: measurement
+        mapping:
+          - scale: 100
+  - entity: number
+    name: High level
+    category: config
+    icon: "mdi:arrow-collapse-up"
+    dps:
+      - id: 7
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+  - entity: number
+    name: Low level
+    category: config
+    icon: "mdi:arrow-collapse-down"
+    dps:
+      - id: 8
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+  - entity: number
+    name: Installation height
+    category: config
+    class: distance
+    icon: "mdi:human-male-height"
+    dps:
+      - id: 19
+        type: integer
+        optional: true
+        name: value
+        unit: m
+        range:
+          min: 100
+          max: 3000
+        mapping:
+          - scale: 1000
+  - entity: number
+    name: Maximum depth
+    category: config
+    class: distance
+    icon: "mdi:wave-arrow-up"
+    dps:
+      - id: 21
+        type: integer
+        optional: true
+        name: value
+        unit: m
+        range:
+          min: 100
+          max: 2900
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    name: Level
+    category: diagnostic
+    icon: "mdi:water-percent"
+    dps:
+      - id: 22
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement

+ 9 - 9
custom_components/tuya_local/devices/smartcurtain_acs_wt.yaml

@@ -16,15 +16,15 @@ primary_entity:
           value: close
           value: close
         - dps_val: stop
         - dps_val: stop
           value: stop
           value: stop
-  - id: 102
-    type: integer
-    name: current_position
-  - id: 104
-    type: integer
-    name: position
-    range:
-      min: 0
-      max: 100
+    - id: 102
+      type: integer
+      name: current_position
+    - id: 104
+      type: integer
+      name: position
+      range:
+        min: 0
+        max: 100
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch
     name: Reverse
     name: Reverse