name: Bidirectional energy meter
legacy_type: dcenta_dual_meter
products:
  - id: z95s7p3z54xbsjnl
    manufacturer: MatSeePlus
    name: Bidirectional 2 channel clamp meter
  - id: bbcg1hrkrj5rifsd
    manufacturer: MatSeePlus
    name: Bidirectional 2 channel clamp meter
  - id: 81yrt3lo
    manufacturer: KKMoon
    model: PJ-1203A
    name: Zigbee energy meter
entities:
  - entity: sensor
    translation_key: energy_consumed
    class: energy
    dps:
      - id: 1
        type: integer
        optional: true
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - dps_val: null
            value_redirect: alternate
          - scale: 100
      - id: 130
        type: integer
        optional: true
        name: alternate
        hidden: true
        mapping:
          - scale: 100
  - entity: sensor
    translation_key: energy_produced
    class: energy
    dps:
      - id: 2
        type: integer
        optional: true
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - dps_val: null
            value_redirect: alternate
          - scale: 100
      - id: 131
        type: integer
        optional: true
        name: alternate
        hidden: true
        mapping:
          - scale: 100
  - entity: sensor
    translation_key: power_x
    translation_placeholders:
      x: A
    class: power
    category: diagnostic
    dps:
      - id: 101
        type: integer
        name: sensor
        unit: W
        class: measurement
        mapping:
          - scale: 10
      - id: 102
        type: string
        optional: true
        name: direction
      - id: 118
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: power_x
    translation_placeholders:
      x: B
    class: power
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
        unit: W
        class: measurement
        mapping:
          - scale: 10
      - id: 104
        type: string
        optional: true
        name: direction
      - id: 124
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: energy_consumed_x
    translation_placeholders:
      x: A
    class: energy
    category: diagnostic
    dps:
      - id: 106
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - scale: 100
      - id: 119
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: energy_produced_x
    translation_placeholders:
      x: A
    class: energy
    category: diagnostic
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - scale: 100
      - id: 127
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: energy_consumed_x
    translation_placeholders:
      x: B
    class: energy
    category: diagnostic
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - scale: 100
      - id: 125
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: energy_produced_x
    translation_placeholders:
      x: B
    class: energy
    category: diagnostic
    dps:
      - id: 109
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - scale: 100
      - id: 128
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    name: Power factor A
    class: power_factor
    category: diagnostic
    dps:
      - id: 110
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    class: frequency
    category: diagnostic
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: Hz
        class: measurement
        mapping:
          - scale: 100
      - id: 122
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    class: voltage
    category: diagnostic
    dps:
      - id: 112
        type: integer
        name: sensor
        unit: V
        class: measurement
        mapping:
          - scale: 10
      - id: 116
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: current_x
    translation_placeholders:
      x: A
    class: current
    category: diagnostic
    dps:
      - id: 113
        type: integer
        name: sensor
        unit: A
        class: measurement
        mapping:
          - scale: 1000
      - id: 117
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    translation_key: current_x
    translation_placeholders:
      x: B
    class: current
    category: diagnostic
    dps:
      - id: 114
        type: integer
        name: sensor
        unit: A
        class: measurement
        mapping:
          - scale: 1000
      - id: 123
        type: integer
        name: calibration
        mapping:
          - scale: 1000
  - entity: sensor
    name: Total power
    class: power
    category: diagnostic
    dps:
      - id: 115
        type: integer
        name: sensor
        unit: W
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    name: Power factor B
    class: power_factor
    category: diagnostic
    dps:
      - id: 121
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: number
    name: Reporting rate
    category: config
    class: duration
    icon: "mdi:timer-refresh"
    dps:
      - id: 129
        type: integer
        name: value
        unit: s
        range:
          min: 3
          max: 60
