name: Curtain and lights
products:
  - id: jcw6pwi3f7ew4s0f
    manufacturer: Avatto
    model: SYS-CLS02
entities:
  - entity: cover
    class: curtain
    dps:
      - id: 1
        name: control
        type: string
        mapping:
          - dps_val: open
            value: open
          - dps_val: close
            value: close
          - dps_val: stop
            value: stop
      - id: 2
        name: position
        type: integer
        unit: "%"
        range:
          min: 0
          max: 100
        mapping:
          - step: 10
  - entity: light
    name: Light 1
    dps:
      - id: 102
        type: boolean
        name: switch
  - entity: light
    name: Light 2
    dps:
      - id: 105
        type: boolean
        name: switch
  - entity: select
    name: Calibration
    icon: "mdi:curtains"
    category: config
    dps:
      - id: 3
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: start
            value: Start
          - dps_val: end
            value: End
  - entity: light
    translation_key: backlight
    category: config
    dps:
      - id: 7
        type: boolean
        name: switch
  - entity: select
    name: Direction
    icon: "mdi:arrow-u-down-left"
    category: config
    dps:
      - id: 8
        type: string
        name: option
        mapping:
          - dps_val: forward
            value: Forward
          - dps_val: back
            value: Back
  - entity: number
    name: Travel time
    category: config
    class: duration
    icon: "mdi:timer"
    dps:
      - id: 10
        type: integer
        name: value
        unit: s
        range:
          min: 10
          max: 120
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    category: config
    dps:
      - id: 104
        type: integer
        optional: true
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    category: config
    dps:
      - id: 107
        type: integer
        optional: true
        name: second
        range:
          min: 0
          max: 86400
  - entity: select
    name: Percentage switch
    icon: "mdi:percent-box"
    category: config
    dps:
      - id: 101
        type: boolean
        name: option
        mapping:
          - dps_val: true
            value: percent_on
          - dps_val: false
            value: percent_off
  - entity: text
    name: Random schedule 1
    category: config
    icon: "mdi:calendar-clock"
    hidden: true
    dps:
      - id: 103
        type: base64
        optional: true
        name: value
  - entity: text
    name: Random schedule 2
    category: config
    icon: "mdi:calendar-clock"
    hidden: true
    dps:
      - id: 106
        type: base64
        optional: true
        name: value
  - entity: number
    name: Calibration position
    category: config
    icon: "mdi:curtains"
    dps:
      - id: 108
        type: integer
        optional: true
        name: value
        unit: "%"
        range:
          min: 0
          max: 100
