name: Solar inverter
products:
  - id: 2zkyfrpmfxmex896
    manufacturer: Stepuptech
    model: SPD-800
entities:
  - entity: sensor
    class: energy
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: Wh
        class: total_increasing
        mapping:
          - scale: 100
      - id: 10
        type: integer
        optional: true
        # labelled total, but range is much smaller than above
        name: daily
        mapping:
          - scale: 100
      - id: 103
        type: integer
        optional: true
        name: product_category
      - id: 106
        type: string
        optional: true
        name: market
      - id: 111
        type: string
        optional: true
        name: meter_id
      - id: 112
        type: string
        optional: true
        name: model
  - entity: sensor
    class: voltage
    dps:
      - id: 101
        type: integer
        optional: true
        name: sensor
        class: measurement
        unit: V
        mapping:
          - scale: 100
  - entity: sensor
    name: PV1 voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 114
        type: integer
        name: sensor
        unit: V
        mapping:
          - scale: 100
  - entity: sensor
    class: current
    dps:
      - id: 102
        type: integer
        optional: true
        name: sensor
        unit: A
        class: measurement
        mapping:
          - scale: 100
  - entity: sensor
    name: PV1 current
    class: current
    category: diagnostic
    dps:
      - id: 115
        type: integer
        name: sensor
        unit: A
        mapping:
          - scale: 100
  - entity: sensor
    class: frequency
    category: diagnostic
    dps:
      - id: 116
        type: integer
        name: sensor
        unit: Hz
        class: measurement

  - entity: sensor
    name: PV2 voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 117
        type: integer
        name: sensor
        unit: V
        mapping:
          - scale: 100
  - entity: sensor
    name: PV2 current
    class: current
    category: diagnostic
    dps:
      - id: 118
        type: integer
        name: sensor
        unit: A
        mapping:
          - scale: 100
  - entity: sensor
    class: temperature
    dps:
      - id: 107
        type: integer
        name: sensor
        class: measurement
      - id: 113
        type: string
        optional: true
        name: unit
        mapping:
          - dps_val: fahrenheit_degree
            value: F
          - value: C
  - entity: sensor
    name: AC voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: V
        mapping:
          - scale: 100
  - entity: sensor
    name: AC current
    class: current
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
        unit: A
        mapping:
          - scale: 100
  - entity: switch
    name: Inverter switch
    category: config
    dps:
      - id: 6
        type: boolean
        name: switch
        optional: true
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 7
        type: bitfield
        optional: true
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 7
        type: bitfield
        optional: true
        name: fault_code
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 113
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: centigrade
            value: celsius
          - dps_val: fahrenheit_degree
            value: fahrenheit
  - entity: select
    translation_key: currency
    category: config
    dps:
      - id: 109
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: Euro
            value: eur
          - dps_val: USD
            value: usd
          - dps_val: RMB
            value: cny
  - entity: text
    name: Cost per kWh
    category: config
    class: monetary
    dps:
      - id: 110
        type: string
        optional: true
        name: value
