name: Curtain and lights
products:
  - id: n76sxga6lyfujuac
    manufacturer: Avatto
    model: SYS-CL02
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: 101
        type: boolean
        name: switch
  - entity: light
    name: Light 2
    dps:
      - id: 102
        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: select
    name: Motor connection
    icon: "mdi:cogs"
    category: config
    dps:
      - id: 12
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: strong_power
            value: Direct
          - dps_val: dry_contact
            value: Via relay
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    category: config
    dps:
      - id: 103
        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: 104
        type: integer
        optional: true
        name: second
        range:
          min: 0
          max: 86400
  - entity: number
    name: Light 1 timer
    # 2025-07-20
    deprecated: time.timer_1
    category: config
    class: duration
    translation_key: timer
    dps:
      - id: 103
        type: integer
        optional: true
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: number
    name: Light 2 timer
    # 2025-07-20
    deprecated: time.timer_2
    category: config
    class: duration
    translation_key: timer
    dps:
      - id: 104
        type: integer
        optional: true
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
