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

Add VERATTI V4 3-phase circuit breaker (#4743)

* Add VERATTI V4 3-phase circuit breaker

Product ID: zxhlsbmhkauiyget

Entities:
- Switch (DPS 16)
- Energy and reverse energy sensors (DPS 1, 110)
- Per-phase voltage, current and power via base64 (DPS 6/7/8)
- Temperature (DPS 103)
- Leakage current (DPS 15)
- Problem binary sensor (DPS 9)

Tested on real hardware.

* Address review feedback
João Vitor Borges 1 день назад
Родитель
Сommit
254bd47462
1 измененных файлов с 224 добавлено и 0 удалено
  1. 224 0
      custom_components/tuya_local/devices/veratti_3phase_breaker.yaml

+ 224 - 0
custom_components/tuya_local/devices/veratti_3phase_breaker.yaml

@@ -0,0 +1,224 @@
+name: Circuit breaker
+products:
+  - id: zxhlsbmhkauiyget
+    manufacturer: VERATTI
+    model: V4 3-phase circuit breaker
+entities:
+  - entity: switch
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+
+  - entity: sensor
+    translation_key: energy_consumed
+    class: energy
+    dps:
+      - id: 1
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+
+  - entity: sensor
+    translation_key: energy_produced
+    class: energy
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+
+  - entity: sensor
+    translation_key: voltage_x
+    translation_placeholders:
+      x: A
+    class: voltage
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: V
+        class: measurement
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+
+  - entity: sensor
+    translation_key: current_x
+    translation_placeholders:
+      x: A
+    class: current
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: A
+        class: measurement
+        mask: "0000FFFFFF000000"
+        mapping:
+          - scale: 1000
+
+  - entity: sensor
+    translation_key: power_x
+    translation_placeholders:
+      x: A
+    class: power
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: W
+        class: measurement
+        mask: "0000000000FFFFFF"
+
+  - entity: sensor
+    translation_key: voltage_x
+    translation_placeholders:
+      x: B
+    class: voltage
+    hidden: true
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: V
+        class: measurement
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+
+  - entity: sensor
+    translation_key: current_x
+    translation_placeholders:
+      x: B
+    class: current
+    hidden: true
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: A
+        class: measurement
+        mask: "0000FFFFFF000000"
+        mapping:
+          - scale: 1000
+
+  - entity: sensor
+    translation_key: power_x
+    translation_placeholders:
+      x: B
+    class: power
+    hidden: true
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: W
+        class: measurement
+        mask: "0000000000FFFFFF"
+
+  - entity: sensor
+    translation_key: voltage_x
+    translation_placeholders:
+      x: C
+    class: voltage
+    hidden: true
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: V
+        class: measurement
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+
+  - entity: sensor
+    translation_key: current_x
+    translation_placeholders:
+      x: C
+    class: current
+    hidden: true
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: A
+        class: measurement
+        mask: "0000FFFFFF000000"
+        mapping:
+          - scale: 1000
+
+  - entity: sensor
+    translation_key: power_x
+    translation_placeholders:
+      x: C
+    class: power
+    hidden: true
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        force: true
+        unit: W
+        class: measurement
+        mask: "0000000000FFFFFF"
+
+  - entity: sensor
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 103
+        type: integer
+        name: sensor
+        unit: "\xB0C"
+        class: measurement
+
+  - entity: sensor
+    name: Leakage current
+    class: current
+    category: diagnostic
+    dps:
+      - id: 15
+        type: integer
+        name: sensor
+        unit: mA
+        class: measurement
+
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 9
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 9
+        type: bitfield
+        name: fault_code