name: Curtain
products:
  - id: 550grkojy40jodv0
    name: LS830-TY
primary_entity:
  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
secondary_entities:
  - 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
  - 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
