name: Curtain
products:
  - id: 550grkojy40jodv0
    model: LS830-TY
entities:
  - entity: cover
    class: curtain
    dps:
      - id: 1
        type: string
        name: control
        mapping:
          - dps_val: open
            value: open
          - dps_val: close
            value: close
          - dps_val: stop
            value: stop
      - id: 2
        type: integer
        name: position
        optional: true
        range:
          min: 0
          max: 100
        mapping:
          - invert: true
      - id: 3
        type: integer
        name: current_position
        range:
          min: 0
          max: 100
        mapping:
          - invert: true
  - entity: select
    name: Direction
    icon: "mdi:arrow-u-left-bottom"
    category: config
    dps:
      - id: 5
        type: boolean
        name: option
        mapping:
          - dps_val: false
            value: Clockwise
          - dps_val: true
            value: Anti-clockwise
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 10
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 10
        type: bitfield
        optional: true
        name: fault_code
  - entity: sensor
    name: Running time
    class: duration
    category: diagnostic
    dps:
      - id: 11
        type: integer
        name: sensor
        optional: true
        unit: s
        class: measurement
        mapping:
          - scale: 1000
          - dps_val: null
            value: 0
