name: Solar charging controller
products:
  - id: 8dgup45mwlbnguby
    manufacturer: MakeSkyBlue
    model: v123 MPPT controller
entities:
  - entity: sensor
    class: enum
    category: diagnostic
    name: Charge mode
    dps:
      - id: 101
        type: string
        name: sensor
        mapping:
          - dps_val: mode_1
            value: Standby
          - dps_val: mode_2
            value: mode_2
          - dps_val: mode_3
            value: Constant voltage
          - dps_val: mode_4
            value: MPPT
          - dps_val: mode_5
            value: Floating charge
  - entity: sensor
    class: voltage
    category: diagnostic
    name: Solar voltage
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: V
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    class: voltage
    category: diagnostic
    name: Battery voltage
    dps:
      - id: 103
        type: integer
        name: sensor
        unit: V
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    class: current
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: A
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
        unit: W
        class: measurement
        mapping:
          - scale: 10
  - entity: switch
    hidden: true
    name: Charging
    category: config
    dps:
      - id: 106
        type: boolean
        name: switch
        optional: true
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 107
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 107
        type: bitfield
        name: fault_code
  - entity: sensor
    class: energy
    category: diagnostic
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
        mapping:
          - scale: 10
  - entity: number
    name: Undervoltage recovery level
    class: voltage
    category: config
    dps:
      - id: 109
        type: integer
        name: value
        unit: V
        mapping:
          - scale: 10
        range:
          min: 0
          max: 1000
  - entity: number
    name: Undervoltage level
    category: config
    class: voltage
    dps:
      - id: 110
        type: integer
        name: value
        unit: V
        mapping:
          - scale: 10
        range:
          min: 0
          max: 1000
  - entity: sensor
    category: diagnostic
    class: battery
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: "%"
        range:
          min: 0
          max: 100
  - entity: select
    name: Battery type
    category: config
    dps:
      - id: 112
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: lead_acid
            value: Lead acid
          - dps_val: lithium
            value: Lithium
  - entity: sensor
    category: diagnostic
    class: temperature
    dps:
      - id: 113
        type: integer
        name: sensor
        unit: C
        range:
          min: -400
          max: 1200
        mapping:
          - scale: 10
  - entity: sensor
    name: Battery cells
    category: diagnostic
    dps:
      - id: 114
        type: integer
        name: sensor
  - entity: number
    name: Equalization voltage
    category: config
    class: voltage
    dps:
      - id: 115
        type: integer
        name: value
        unit: V
        mapping:
          - scale: 10
        range:
          min: 0
          max: 1000
  - entity: number
    name: Float charge voltage
    category: config
    class: voltage
    dps:
      - id: 116
        type: integer
        name: value
        unit: V
        mapping:
          - scale: 10
        range:
          min: 0
          max: 1000
  - entity: number
    name: Constant current
    category: config
    class: current
    dps:
      - id: 117
        type: integer
        name: value
        unit: A
        range:
          min: 0
          max: 150
  - entity: number
    category: config
    translation_key: timer
    class: duration
    dps:
      - id: 118
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 24
