name: Quad power strip + 4USB
products:
  - id: rpnp3rtjjzbktign
    model: "4T+4USB"
  - id: l7z01thw8rcy5nuu
    manufacturer: Marmitek
    model: Power LI3
entities:
  - entity: switch
    translation_key: outlet_x
    translation_placeholders:
      x: "1"
    class: outlet
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: switch
    translation_key: outlet_x
    translation_placeholders:
      x: "2"
    dps:
      - id: 2
        type: boolean
        name: switch
  - entity: switch
    translation_key: outlet_x
    translation_placeholders:
      x: "3"
    dps:
      - id: 3
        type: boolean
        name: switch
  - entity: switch
    translation_key: outlet_x
    translation_placeholders:
      x: "4"
    dps:
      - id: 4
        type: boolean
        name: switch
  - entity: switch
    name: USB
    dps:
      - id: 7
        type: boolean
        name: switch
  - entity: time
    category: config
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    dps:
      - id: 9
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    category: config
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    dps:
      - id: 10
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    category: config
    translation_key: timer_x
    translation_placeholders:
      x: "3"
    dps:
      - id: 11
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    category: config
    translation_key: timer_x
    translation_placeholders:
      x: "4"
    dps:
      - id: 12
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    category: config
    translation_key: timer_x
    translation_placeholders:
      x: USB
    dps:
      - id: 15
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: sensor
    category: diagnostic
    class: current
    dps:
      - id: 18
        name: sensor
        type: integer
        class: measurement
        force: true
        unit: mA
      - id: 23
        type: integer
        name: calibration
        optional: true
  - entity: sensor
    category: diagnostic
    class: power
    dps:
      - id: 19
        name: sensor
        type: integer
        class: measurement
        force: true
        unit: W
        mapping:
          - scale: 10
      - id: 24
        type: integer
        name: calibration
        optional: true
      - id: 17
        type: integer
        name: add_ele
        optional: true
      - id: 25
        type: integer
        name: ele_calibration
        optional: true
  - entity: sensor
    category: diagnostic
    class: voltage
    dps:
      - id: 20
        name: sensor
        type: integer
        class: measurement
        force: true
        unit: V
        mapping:
          - scale: 10
      - id: 22
        type: integer
        name: calibration
        optional: true
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 26
        type: bitfield
        optional: true
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 26
        type: bitfield
        optional: true
        name: fault_code
      - id: 21
        type: bitfield
        optional: true
        name: test_bit
  - entity: select
    translation_key: initial_state
    category: config
    hidden: unavailable
    dps:
      - id: 38
        type: string
        optional: true
        name: option
        mapping:
          - conditions:
              - dps_val: [memory, "off", "on"]
                mapping:
                  - dps_val: "off"
                    value: "off"
                  - dps_val: "on"
                    value: "on"
                  - dps_val: memory
                    value: memory
              - dps_val: [power_off, power_on, last]
                mapping:
                  - dps_val: power_off
                    value: "off"
                  - dps_val: power_on
                    value: "on"
                  - dps_val: last
                    value: memory
              - dps_val: ["0", "1", "2"]
                mapping:
                  - dps_val: "0"
                    value: "off"
                  - dps_val: "1"
                    value: "on"
                  - dps_val: "2"
                    value: memory
              - dps_val: null  # to get value list during initialization
                mapping:
                  - dps_val: "off"
                    value: "off"
                  - dps_val: "on"
                    value: "on"
                  - dps_val: memory
                    value: memory
      - id: 38
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: text
    translation_key: schedule
    category: config
    hidden: true
    dps:
      - id: 41
        type: string
        optional: true
        name: value
  - entity: text
    name: Randomized schedule
    category: config
    icon: "mdi:island"
    hidden: true
    dps:
      - id: 42
        type: string
        optional: true
        name: value
  - entity: text
    name: Inching
    category: config
    icon: "mdi:toggle-switch"
    hidden: true
    dps:
      - id: 43
        type: string
        optional: true
        name: value
  - entity: number
    name: Current limit
    class: current
    category: config
    hidden: unavailable
    dps:
      - id: 101
        type: integer
        optional: true
        name: value
        unit: A
        range:
          min: 11
          max: 17
      - id: 101
        type: integer
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
