name: Presence sensor
# products:
#   - id: UNKNOWN
#     manufacturer: Moes
#     model: WSS-QY-HP-MS
entities:
  - entity: binary_sensor
    class: occupancy
    dps:
      - id: 1
        type: string
        name: sensor
        mapping:
          - dps_val: presence
            value: true
          - value: false
      - id: 6
        type: string
        name: selftest_result
  - entity: number
    name: Sensitivity
    category: config
    icon: "mdi:motion-sensor"
    dps:
      - id: 2
        type: integer
        name: value
        range:
          min: 0
          max: 9
  - entity: number
    name: Minimum distance
    category: config
    class: distance
    dps:
      - id: 3
        type: integer
        name: value
        unit: m
        range:
          min: 0
          max: 950
        mapping:
          - scale: 100
  - entity: number
    name: Maximum distance
    category: config
    class: distance
    dps:
      - id: 4
        type: integer
        name: value
        unit: m
        range:
          min: 0
          max: 950
        mapping:
          - scale: 100
  - entity: number
    name: Detect delay
    class: duration
    category: config
    icon: "mdi:camera-timer"
    dps:
      - id: 101
        type: integer
        name: value
        unit: s
        range:
          min: 0
          max: 500
        mapping:
          - scale: 10
  - entity: number
    name: Clear delay
    class: duration
    category: config
    icon: "mdi:camera-timer"
    dps:
      - id: 102
        type: integer
        name: value
        unit: s
        range:
          min: 0
          max: 15000
        mapping:
          - scale: 10
  - entity: sensor
    class: illuminance
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: lx
        class: measurement
  - entity: number
    name: Identify level
    category: config
    dps:
      - id: 107
        type: integer
        name: value
        range:
          min: 0
          max: 3
  - entity: number
    name: Trigger level
    category: config
    dps:
      - id: 108
        type: integer
        name: value
        range:
          min: 0
          max: 3
