name: Portable power station
products:
  - id: 38dwmljaokq3yclf
    manufacturer: Oscal
    model: PowerMax 6000
entities:
  - entity: sensor
    class: battery
    dps:
      - id: 1
        type: integer
        name: sensor
        unit: "%"
        class: measurement
      - id: 112
        type: integer
        optional: true
        name: power_packs
  - entity: switch
    name: AC power
    dps:
      - id: 6
        type: boolean
        name: switch
      - id: 102
        type: string
        name: sw_version
  - entity: switch
    name: DC power
    dps:
      - id: 7
        type: boolean
        name: switch
  - entity: select
    name: Light
    icon: "mdi:led"
    dps:
      - id: 9
        type: string
        name: option
        mapping:
          - dps_val: "off"
            value: "Off"
          - dps_val: bright
            value: Dim
          - dps_val: high_bright
            value: Bright
          - dps_val: sos
            value: Emergency
          - dps_val: breath
            value: Pulse
          - dps_val: flash
            value: Flash
  - entity: sensor
    class: temperature
    name: Battery temperature
    category: diagnostic
    dps:
      - id: 10
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: switch
    translation_key: keytone
    category: config
    dps:
      - id: 12
        type: boolean
        name: switch
  - entity: switch
    name: USB
    dps:
      - id: 19
        type: boolean
        name: switch
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 24
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: switch
    translation_key: sound
    category: config
    dps:
      - id: 25
        type: boolean
        name: switch
  - entity: sensor
    class: duration
    name: Generation time
    category: diagnostic
    dps:
      - id: 37
        type: integer
        name: sensor
        unit: h
        class: measurement
  - entity: switch
    name: Notifications
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: sensor
    name: Total input
    class: power
    category: diagnostic
    dps:
      - id: 103
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: Total output
    class: power
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: AC output
    class: power
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: number
    name: Charge limit
    category: config
    icon: "mdi:battery-charging-90"
    dps:
      - id: 106
        type: integer
        name: value
        unit: "%"
        range:
          min: 70
          max: 100
  - entity: number
    name: Discharge limit
    category: config
    icon: "mdi:battery-20"
    dps:
      - id: 107
        type: integer
        name: value
        unit: "%"
        range:
          min: 0
          max: 30
  - entity: sensor
    name: Estimated battery life
    class: duration
    category: diagnostic
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: d
  - entity: select
    name: Display timeout
    icon: "mdi:television-ambient-light"
    translation_key: timer
    category: config
    dps:
      - id: 109
        type: string
        name: option
        mapping:
          - dps_val: "1min"
            value: "1m"
          - dps_val: "5min"
            value: "5m"
          - dps_val: "10min"
            value: "10m"
          - dps_val: "30min"
            value: "30m"
          - dps_val: "never_close"
            value: "cancel"
  - entity: sensor
    class: enum
    translation_key: status
    category: diagnostic
    dps:
      - id: 110
        type: string
        name: sensor
        mapping:
          - dps_val: "1"
            value: charging
          - dps_val: "2"
            value: discharging
          - dps_val: "0"
            value: standby
  - entity: sensor
    name: AC input
    class: power
    category: diagnostic
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: Solar input
    class: power
    category: diagnostic
    dps:
      - id: 113
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: switch
    name: Slow charge
    category: config
    icon: "mdi:battery-charging"
    dps:
      - id: 114
        type: boolean
        name: switch
  - entity: sensor
    name: DC output
    class: power
    category: diagnostic
    dps:
      - id: 116
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: USB output
    class: power
    category: diagnostic
    dps:
      - id: 117
        type: integer
        name: sensor
        unit: W
        class: measurement
        mapping:
          - scale: 10
  - entity: text
    name: Emergency message
    category: config
    icon: "mdi:dots-horizontal"
    dps:
      - id: 118
        type: string
        name: value
        range:
          min: 0
          max: 255
  - entity: sensor
    name: Pack 1
    class: battery
    category: diagnostic
    dps:
      - id: 120
        type: integer
        name: sensor
        unit: "%"
        class: measurement
      - id: 119
        type: integer
        optional: true
        name: pack_id
  - entity: sensor
    name: Pack 1 temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 121
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: sensor
    name: Pack 1 output
    class: power
    category: diagnostic
    dps:
      - id: 122
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: Pack 2
    class: battery
    category: diagnostic
    dps:
      - id: 124
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    name: Pack 2 temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 125
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: sensor
    name: Pack 2 output
    class: power
    category: diagnostic
    dps:
      - id: 126
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 127
        type: integer
        name: sensor
        unit: min
        class: measurement
  - entity: number
    name: Slow charge
    category: config
    class: power
    dps:
      - id: 128
        type: integer
        optional: true
        name: value
        unit: W
        range:
          min: 100
          max: 1200
        mapping:
          - step: 100
  - entity: sensor
    name: Pack 3
    class: battery
    category: diagnostic
    dps:
      - id: 129
        type: integer
        name: sensor
        unit: "%"
        class: measurement
      - id: 115
        type: integer
        optional: true
        name: pack_id
  - entity: sensor
    name: Pack 3 temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 130
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: sensor
    name: Pack 3 output
    class: power
    category: diagnostic
    dps:
      - id: 131
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: Pack 4
    class: battery
    category: diagnostic
    dps:
      - id: 133
        type: integer
        name: sensor
        unit: "%"
        class: measurement
      - id: 132
        type: integer
        optional: true
        name: pack_id
  - entity: sensor
    name: Pack 4 temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 134
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: sensor
    name: Pack 4 output
    class: power
    category: diagnostic
    dps:
      - id: 135
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    name: Pack 5
    class: battery
    category: diagnostic
    dps:
      - id: 137
        type: integer
        name: sensor
        unit: "%"
        class: measurement
      - id: 136
        type: integer
        optional: true
        name: pack_id
  - entity: sensor
    name: Pack 5 temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 138
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: sensor
    name: Pack 5 output
    class: power
    category: diagnostic
    dps:
      - id: 141
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: select
    name: AC timer
    class: timer
    category: config
    dps:
      - id: 139
        type: string
        name: option
        mapping:
          - dps_val: never_close
            value: cancel
          - dps_val: "30min"
            value: "30m"
          - dps_val: "1hour"
            value: "1h"
          - dps_val: "2hour"
            value: "2h"
          - dps_val: "4hour"
            value: "4h"
          - dps_val: "6hour"
            value: "6h"
          - dps_val: "12hour"
            value: "12h"
          - dps_val: "24hour"
            value: "24h"
  - entity: select
    class: timer
    category: config
    dps:
      - id: 140
        type: string
        name: option
        mapping:
          - dps_val: never_close
            value: cancel
          - dps_val: "30min"
            value: "30m"
          - dps_val: "1hour"
            value: "1h"
          - dps_val: "2hour"
            value: "2h"
          - dps_val: "4hour"
            value: "4h"
          - dps_val: "6hour"
            value: "6h"
          - dps_val: "12hour"
            value: "12h"
          - dps_val: "24hour"
            value: "24h"
