name: Curtain robot
products:
  - id: kcy0x4pi
    manufacturer: Dongguan Lianyou
    model: LY1678-2
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: 3
        name: current_position
        type: integer
        unit: "%"
        range:
          min: 0
          max: 100
        mapping:
          - invert: true
        optional: true
        persist: false
      - id: 7
        name: learning_state
        type: string
  - entity: select
    category: config
    name: Closed position
    icon: "mdi:arrow-u-down-left"
    dps:
      - id: 101
        type: string
        name: option
        mapping:
          - dps_val: "left"
            value: "left"
          - dps_val: "right"
            value: "right"
  - entity: sensor
    class: temperature
    dps:
      - id: 103
        name: sensor
        type: integer
        unit: C
        class: measurement
  - entity: sensor
    class: illuminance
    dps:
      - id: 104
        name: sensor
        type: integer
        unit: lx
        class: measurement
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 12
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 12
        type: bitfield
        name: fault_code
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 13
        type: integer
        name: sensor
        unit: "%"
