Răsfoiți Sursa

Add support for EARU 3-Phase Breaker (EAMPDW-TY-63) (#4075)

* Add support for EARU 3-Phase Breaker (EAMPDW-TY-63)

* Polish: add icons to protection settings

* fix entities array

* fix: Set mapping for base64 values

* fix: Use mask to parse base64 sensor values

* fix translation keys

* add translations for sensors

* cleanup (earu_3phase_breaker): HA naming convention and unneeded scaling

Updated the name from 'Breaker Meter' to 'Breaker meter' and removed unnecessary mapping entries for sensor entities.

PR #4075

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Oleg Frolov 2 luni în urmă
părinte
comite
629e437a38
1 a modificat fișierele cu 217 adăugiri și 0 ștergeri
  1. 217 0
      custom_components/tuya_local/devices/earu_3phase_breaker.yaml

+ 217 - 0
custom_components/tuya_local/devices/earu_3phase_breaker.yaml

@@ -0,0 +1,217 @@
+name: Breaker meter
+products:
+  - id: nopfbtfxnwqcrg5y
+    manufacturer: EARU
+    model: EAMPDW-TY-63
+entities:
+  - entity: switch
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+
+  - entity: sensor
+    class: energy
+    dps:
+      - id: 1
+        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
+        unit: V
+        mask: "FFFF0000000000000000"
+        mapping:
+          - scale: 10
+
+  - entity: sensor
+    translation_key: current_x
+    translation_placeholders:
+      x: A
+    class: current
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: A
+        mask: "0000FFFFFF0000000000"
+        mapping:
+          - scale: 1000
+
+  - entity: sensor
+    translation_key: power_x
+    translation_placeholders:
+      x: A
+    class: power
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: W
+        mask: "0000000000FFFFFF0000"
+
+  - entity: sensor
+    translation_key: voltage_x
+    translation_placeholders:
+      x: B
+    class: voltage
+    hidden: true
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        unit: V
+        mask: "FFFF0000000000000000"
+        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
+        unit: A
+        mask: "0000FFFFFF0000000000"
+        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
+        unit: W
+        mask: "0000000000FFFFFF0000"
+
+  - entity: sensor
+    translation_key: voltage_x
+    translation_placeholders:
+      x: C
+    class: voltage
+    hidden: true
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        unit: V
+        mask: "FFFF0000000000000000"
+        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
+        unit: A
+        mask: "0000FFFFFF0000000000"
+        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
+        unit: W
+        mask: "0000000000FFFFFF0000"
+
+  - entity: number
+    translation_key: sensor_threshold
+    translation_placeholders:
+      sensor: Overvoltage
+    class: voltage
+    category: config
+    dps:
+      - id: 101
+        type: integer
+        name: value
+        unit: "V"
+        range:
+          min: 220
+          max: 300
+
+  - entity: number
+    translation_key: sensor_threshold
+    translation_placeholders:
+      sensor: Undervoltage
+    class: voltage
+    category: config
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: "V"
+        range:
+          min: 140
+          max: 210
+
+  - entity: number
+    translation_key: sensor_threshold
+    translation_placeholders:
+      sensor: Overcurrent
+    class: current
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        unit: "A"
+        range:
+          min: 1
+          max: 63
+
+  - entity: number
+    translation_key: sensor_threshold
+    translation_placeholders:
+      sensor: Leakage
+    class: current
+    category: config
+    dps:
+      - id: 104
+        type: integer
+        name: value
+        unit: "mA"
+        range:
+          min: 10
+          max: 100