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
    translation_key: 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
