name: USB + 3 outlet power monitor powerstrip
products:
  - id: tsbguim4trl6fa7g
    manufacturer: Gosund
    model: P1
entities:
  - entity: switch
    class: outlet
    translation_key: outlet_x
    translation_placeholders:
      x: "1"
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: switch
    translation_key: outlet_x
    translation_placeholders:
      x: "2"
    class: outlet
    dps:
      - id: 2
        type: boolean
        name: switch
  - entity: switch
    translation_key: outlet_x
    translation_placeholders:
      x: "3"
    class: outlet
    dps:
      - id: 3
        type: boolean
        name: switch
  - entity: switch
    name: USB switch
    class: switch
    dps:
      - id: 7
        type: boolean
        name: switch
  - entity: number
    category: config
    class: duration
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    dps:
      - id: 9
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: number
    category: config
    class: duration
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    dps:
      - id: 10
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: number
    category: config
    class: duration
    translation_key: timer_x
    translation_placeholders:
      x: "3"
    dps:
      - id: 11
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: number
    name: USB Timer
    category: config
    class: duration
    translation_key: timer
    dps:
      - id: 15
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: sensor
    class: current
    category: diagnostic
    dps:
      - id: 18
        type: integer
        name: sensor
        unit: mA
        force: true
        class: measurement
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 19
        type: integer
        name: sensor
        unit: W
        class: measurement
        force: true
        mapping:
          - scale: 10
  - entity: sensor
    class: voltage
    category: diagnostic
    dps:
      - id: 20
        type: integer
        name: sensor
        unit: V
        class: measurement
        force: true
        mapping:
          - scale: 10
  - entity: binary_sensor
    name: Overload
    class: problem
    category: diagnostic
    dps:
      - id: 101
        type: boolean
        name: sensor
  - entity: binary_sensor
    name: USB Overload
    class: problem
    category: diagnostic
    dps:
      - id: 102
        type: boolean
        name: sensor
