Răsfoiți Sursa

New device yaml

New device yaml for the Earu Multi Circuit Power Meter that also need a change to the device_config.py code to accept signed integers
BevDan 10 luni în urmă
părinte
comite
6a2321b131

+ 933 - 0
custom_components/tuya_local/devices/earu_multi-circuit_power_meter.yaml

@@ -0,0 +1,933 @@
+name: EARU Multi-Circuit Power Meter
+products:
+  - id: tehjajiyfp2phy4d
+    manufacturer: EARU Electronic
+    model: EASEM-D
+entities:
+  - entity: sensor
+    class: voltage
+    translation_key: voltage_x
+    translation_placeholders:
+      x: A
+    category: diagnostic
+    dps:
+      - id: 101
+        optional: true
+        type: base64
+        unit: V
+        class: measurement
+        name: sensor
+        mask: 000000000000000000FFFFFFFF
+        endianness: little
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: voltage
+    translation_key: voltage_x
+    translation_placeholders:
+      x: B
+    category: diagnostic
+    dps:
+      - id: 102
+        optional: true
+        type: base64
+        unit: V
+        class: measurement
+        name: sensor
+        mask: 000000000000000000FFFFFFFF
+        endianness: little
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: voltage
+    translation_key: voltage_x
+    translation_placeholders:
+      x: C
+    category: diagnostic
+    dps:
+      - id: 103
+        optional: true
+        type: base64
+        unit: V
+        class: measurement
+        name: sensor
+        mask: 000000000000000000FFFFFFFF
+        endianness: little
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: A
+    category: diagnostic
+    dps:
+      - id: 101
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000FFFFFFFF00000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: B
+    category: diagnostic
+    dps:
+      - id: 102
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000FFFFFFFF00000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: C
+    category: diagnostic
+    dps:
+      - id: 103
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000FFFFFFFF00000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: Total
+    category: diagnostic
+    dps:
+      - id: 104
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000FFFFFFFF
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB01
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB02
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB03
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB04
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB05
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB06
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB07
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB08
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB09
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB10
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB11
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB12
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB13
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB14
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 00000000000000000000FFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB15
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: 0000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: current
+    translation_key: current_x
+    translation_placeholders:
+      x: SUB16
+    category: diagnostic
+    dps:
+      - id: 106
+        optional: true
+        type: base64
+        unit: A
+        name: sensor
+        mask: FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: A
+    category: diagnostic
+    dps:
+      - id: 101
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00FFFFFFFF0000000000000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: B
+    category: diagnostic
+    dps:
+      - id: 102
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00FFFFFFFF0000000000000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: C
+    category: diagnostic
+    dps:
+      - id: 103
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00FFFFFFFF0000000000000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: Total
+    category: diagnostic
+    dps:
+      - id: 104
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00FFFFFFFF00000000
+        endianness: little
+        signed_bits: 32
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB01
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB02
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB03
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB04
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB05
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB06
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB07
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB08
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB09
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 0000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB10
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 000000000000000000000000000000000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB11
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB12
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 0000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB13
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB14
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 00000000000000000000FFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB15
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: 0000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    translation_key: power_x
+    translation_placeholders:
+      x: SUB16
+    category: diagnostic
+    dps:
+      - id: 105
+        optional: true
+        type: base64
+        unit: kW
+        name: sensor
+        mask: FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        endianness: little
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    name: Energy SUB01
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 115
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB02
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 116
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB03
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 117
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB04
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 118
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB05
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 119
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB06
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 120
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB07
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 121
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB08
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 122
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB09
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 123
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB10
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 124
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB11
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 125
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB12
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 126
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB13
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 127
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB14
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 128
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB15
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 129
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Energy SUB16
+    class: energy
+    category: diagnostic
+    dps:
+      - id: 130
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    translation_key: energy_consumed
+    class: energy
+    dps:
+      - id: 131
+        type: integer
+        optional: true
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    class: energy
+    translation_key: energy_produced
+    dps:
+      - id: 132
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    name: Meter Type
+    category: diagnostic
+    dps:
+      - id: 108
+        type: string
+        name: sensor
+  - entity: sensor
+    name: Solar Total
+    category: diagnostic
+    dps:
+      - id: 112
+        type: string
+        name: sensor