name: Solar inverter
products:
  - id: ayg4cocdsg1mkchp
    manufacturer: Parkside
    model: PG-300
entities:
  - entity: sensor
    translation_key: energy_produced
    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
  - entity: sensor
    translation_key: energy_consumed
    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
        mask: "FFFF00000000"
        mapping:
          - scale: 10
  - entity: sensor
    name: DC current
    class: current
    category: diagnostic
    dps:
      - id: 3
        type: base64
        name: sensor
        unit: A
        force: true
        mask: "0000FFFF0000"
        mapping:
          - scale: 10
  - entity: sensor
    name: AC voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 7
        type: base64
        name: sensor
        unit: V
        force: true
        mask: "FFFF0000000000000000"
        mapping:
          - scale: 10

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