name: mmWave presence sensor
products:
  - id: n3bow00a2vpwgtvx
    name: ZY-M201-WIFI24G
primary_entity:
  entity: binary_sensor
  class: occupancy
  dps:
    - id: 101
      type: string
      name: sensor
      mapping:
        - dps_val: exist
          value: true
        - dps_val: nobody
          value: false
secondary_entities:
  - entity: sensor
    name: Presence state
    class: enum
    icon: mdi:cursor-move
    dps:
      - id: 1
        type: string
        name: sensor
        mapping:
          - dps_val: none
            value: "None"
            icon: "mdi:motion-sensor-off"
          - dps_val: presence
            value: "Still"
            icon: "mdi:human-handsdown"
          - dps_val: move
            value: "Moving"
            icon: "mdi:walk"
  - entity: number
    name: Sensitivity
    category: config
    icon: "mdi:human-greeting-proximity"
    dps:
      - id: 2
        type: integer
        name: value
        optional: true
        range:
          min: 1
          max: 10
  - entity: number
    name: Maximum detection distance
    category: config
    icon: "mdi:arrow-collapse-right"
    dps:
      - id: 4
        type: integer
        name: value
        unit: m
        range:
          min: 150
          max: 550
        mapping:
          - scale: 100
  - entity: sensor
    name: Target distance
    class: distance
    icon: "mdi:tape-measure"
    dps:
      - id: 9
        type: integer
        name: sensor
        unit: m
        class: measurement
        mapping:
          - scale: 100
  - entity: number
    name: Fading time
    category: config
    icon: "mdi:timer-sand-complete"
    dps:
      - id: 102
        type: integer
        name: value
        unit: s
        range:
          min: 5
          max: 1500
        mapping:
          - scale: 10
            step: 5
  - entity: sensor
    class: illuminance
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: lx
        class: measurement
  - entity: number
    name: Static sensitivity
    category: config
    icon: "mdi:human-greeting-proximity"
    dps:
      - id: 111
        type: integer
        name: value
        optional: true
        range:
          min: 1
          max: 10
