name: Human presence sensor
products:
  - id: s6hviigqjdrymvj3
    manufacturer: Treatlife
    model: PS-W
entities:
  - entity: binary_sensor
    class: occupancy
    dps:
      - id: 1
        type: string
        name: sensor
        mapping:
          - dps_val: presence
            value: true
          - value: false
  - entity: number
    name: Motion sensitivity
    category: config
    icon: "mdi:motion-sensor"
    dps:
      - id: 2
        type: integer
        name: value
        range:
          min: 1
          max: 5
  - entity: number
    name: Maximum distance
    class: distance
    category: config
    icon: "mdi:signal-distance-variant"
    dps:
      - id: 4
        type: integer
        name: value
        unit: cm
        range:
          min: 75
          max: 600
        mapping:
          - step: 75
  - entity: sensor
    class: distance
    category: diagnostic
    dps:
      - id: 9
        type: integer
        name: sensor
        unit: cm
        class: measurement
  - entity: sensor
    class: illuminance
    dps:
      - id: 101
        type: integer
        name: sensor
        unit: lx
        class: measurement
  - entity: number
    name: Still sensitivity
    category: config
    icon: "mdi:account-clock"
    dps:
      - id: 102
        type: integer
        name: value
        range:
          min: 1
          max: 5
  - entity: sensor
    class: duration
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: min
        class: measurement
  - entity: light
    translation_key: indicator
    category: config
    dps:
      - id: 105
        type: boolean
        name: switch
