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

Taxnele energy meter: add additional entities

This was a very early addition, and did not have full info, so it isn't
clear how much (if any) applies to the original device, but an additional
device appears compatible, and on checking the manufacturer (Yueqing Taixin
Electric) the website is taxnele.com. Additional dps are all added as optional.

Issue #2910
Jason Rumney 11 месяцев назад
Родитель
Сommit
24fbf2b26f
1 измененных файлов с 205 добавлено и 0 удалено
  1. 205 0
      custom_components/tuya_local/devices/taxnele_energy_meter.yaml

+ 205 - 0
custom_components/tuya_local/devices/taxnele_energy_meter.yaml

@@ -2,9 +2,17 @@ name: Energy meter
 products:
   - id: 3xhdofmeo6lgpvd5
     manufacturer: Taxnele
+  - id: ob3yxwxoeslczzlq
+    manufacturer: Taxnele
+    model: V3 2P 63A bidirectional
+  - id: z3jngbyubvwgfrcv
+    manufacturer: Taxnele
+    model: V3 2P 63A
 entities:
   - entity: sensor
     class: energy
+    # renaming this now will mess up users' long term statistics
+    # translation_key: energy_consumed
     dps:
       - id: 1
         type: integer
@@ -13,6 +21,49 @@ entities:
         class: total_increasing
         mapping:
           - scale: 100
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 6
+        type: base64
+        optional: true
+        name: sensor
+        unit: V
+        class: measurement
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: current
+    category: diagnostic
+    dps:
+      - id: 6
+        type: base64
+        optional: true
+        name: sensor
+        unit: A
+        class: measurement
+        mask: "0000FFFFFF000000"
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: power
+    category: diagnostic
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: W
+        class: measurement
+        mask: "0000000000FFFFFF"
+        mapping:
+          - scale: 10
+      - id: 111
+        type: integer
+        optional: true
+        name: total
   - entity: binary_sensor
     class: problem
     category: diagnostic
@@ -54,6 +105,21 @@ entities:
         class: measurement
         mapping:
           - scale: 100
+  - entity: number
+    name: Charge energy
+    category: config
+    icon: "mdi:cash"
+    dps:
+      - id: 14
+        type: integer
+        optional: true
+        name: value
+        unit: kWh
+        range:
+          min: 0
+          max: 999999
+        mapping:
+          - scale: 100
   - entity: sensor
     name: Leakage current
     class: current
@@ -74,6 +140,53 @@ entities:
       - id: 16
         type: boolean
         name: switch
+  - entity: text
+    name: Alarm 1
+    icon: "mdi:flash-alert"
+    category: config
+    hidden: true
+    dps:
+      - id: 17
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Alarm 2
+    icon: "mdi:flash-alert"
+    category: config
+    hidden: true
+    dps:
+      - id: 18
+        type: base64
+        optional: true
+        name: value
+  - entity: number
+    name: Recovery delay
+    category: config
+    class: duration
+    icon: "mdi:update"
+    dps:
+      - id: 101
+        type: integer
+        optional: true
+        name: value
+        unit: s
+        range:
+          min: 1
+          max: 99
+  - entity: number
+    name: Recovery limit
+    category: config
+    icon: "mdi:fuse-alert"
+    dps:
+      - id: 102
+        type: integer
+        optional: true
+        name: value
+        unit: times
+        range:
+          min: 1
+          max: 30
   - entity: sensor
     class: temperature
     category: diagnostic
@@ -83,3 +196,95 @@ entities:
         name: sensor
         unit: C
         class: measurement
+  - entity: switch
+    name: Auto recovery
+    icon: "mdi:update"
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        optional: true
+        name: switch
+  - entity: number
+    translation_key: timer
+    category: config
+    dps:
+      - id: 105
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+      - id: 106
+        type: string
+        optional: true
+        name: cycle_time
+      - id: 108
+        type: string
+        optional: true
+        name: random_time
+  - entity: number
+    name: Leak delay
+    category: config
+    icon: "mdi:clock-alert"
+    dps:
+      - id: 107
+        type: integer
+        optional: true
+        name: value
+        unit: s
+        range:
+          min: 1
+          max: 99
+  - entity: text
+    name: Inching
+    category: config
+    hidden: true
+    icon: "mdi:refresh-auto"
+    dps:
+      - id: 109
+        type: base64
+        optional: true
+        name: value
+  - entity: sensor
+    class: energy
+    translation_key: energy_produced
+    dps:
+      - id: 110
+        type: integer
+        optional: true
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: text
+    name: Alarm 3
+    icon: "mdi:flash-alert"
+    category: config
+    hidden: true
+    dps:
+      - id: 126
+        type: base64
+        optional: true
+        name: value
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 134
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: "off"
+          - dps_val: "1"
+            value: "on"
+          - dps_val: "2"
+            value: memory