name: EV charger
products:
  - id: lvoduiglznasnnsr
    manufacturer: ADPOW
    model: GO-B6 Pro 32A
entities:
  - entity: sensor
    class: energy
    dps:
      - id: 1
        type: integer
        optional: true
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - scale: 100
  - entity: number
    name: Charge current
    category: config
    class: current
    dps:
      - id: 4
        type: integer
        name: value
        unit: A
        range:
          min: 13
          max: 32
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 9
        type: integer
        optional: true
        name: sensor
        unit: kW
        class: measurement
        mapping:
          - scale: 1000
  - entity: sensor
    name: Connection state
    class: enum
    icon: "mdi:ev-plug-type2"
    category: diagnostic
    dps:
      - id: 13
        type: string
        optional: true
        name: sensor
        mapping:
          - dps_val: controlpi_12v
            value: Standby
          - dps_val: controlpi_12v_pwm
            value: Communication initialising
          - dps_val: controlpi_9v
            value: Vehicle detected
          - dps_val: controlpi_9v_pwm
            value: Vehicle connected
          - dps_val: controlpi_6v
            value: Ready to charge
          - dps_val: controlpi_6v_pwm
            value: Charging
          - dps_val: controlpi_error
            value: Error
      - id: 3
        type: string
        name: unknown_3
      - id: 10
        type: integer
        name: unknown_10
      - id: 103
        type: integer
        name: unknown_103
      - id: 104
        type: integer
        name: unknown_104
      - id: 105
        type: integer
        name: unknown_105
      - id: 106
        type: integer
        name: unknown_106
      - id: 107
        type: integer
        name: unknown_107
      - id: 108
        type: integer
        name: unknown_108
      - id: 109
        type: integer
        name: unknown_109
      - id: 112
        type: integer
        name: unknown_112
      - id: 114
        type: integer
        name: unknown_114
      - id: 117
        type: integer
        name: unknown_117
  - entity: number
    name: Charge energy
    category: config
    class: energy_storage
    dps:
      - id: 17
        type: integer
        name: value
        unit: kWh
        range:
          min: 0
          max: 2000000
        mapping:
          - scale: 100
  - entity: switch
    icon: "mdi:power"
    dps:
      - id: 18
        type: boolean
        name: switch
  - entity: sensor
    class: temperature
    category: diagnostic
    dps:
      - id: 24
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: sensor
    name: Last charge
    category: diagnostic
    dps:
      - id: 25
        type: integer
        optional: true
        name: sensor
        unit: kWh
        class: measurement
        mapping:
          - scale: 100
