name: Solar inverter
products:
  - id: ayg4cocdsg1mkchp
    name: Parkside PG-300
primary_entity:
  entity: sensor
  name: Energy out
  class: energy
  dps:
    - id: 2
      type: integer
      name: sensor
      unit: kWh
      class: total_increasing
      mapping:
        - scale: 100
    - id: 15
      name: model
      type: string
    - id: 16
      name: inverter_id
      type: string
secondary_entities:
  - entity: sensor
    name: Energy in
    class: energy
    category: diagnostic
    dps:
      - id: 1
        type: integer
        name: sensor
        unit: kWh
        optional: true
        class: total_increasing
        mapping:
          - scale: 100
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 10
        type: integer
        name: sensor
        unit: W
        optional: true
        class: measurement

  - entity: sensor
    name: DC voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 3
        type: base64
        name: sensor
        unit: V
        force: true
        mapping:
          - mask: "FFFF00000000"
            scale: 10
  - entity: sensor
    name: DC current
    class: current
    category: diagnostic
    dps:
      - id: 3
        type: base64
        name: sensor
        unit: A
        force: true
        mapping:
          - mask: "0000FFFF0000"
            scale: 10
  - entity: sensor
    name: AC voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 7
        type: base64
        name: sensor
        unit: V
        force: true
        mapping:
          - mask: "FFFF0000000000000000"
            scale: 10

  - entity: switch
    name: Inverter switch
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
        optional: true
