name: PIR Spotlight
products:
  - id: reldobj3ny6fbgvw
    model: Duo LED
    model_id: WFD 3050 P
  - id: 2twfjfhdvygxxqtq
    manufacturer: Nedis
    name: Outdoor floodlight
  - id: key3pw4guvnat9ad
    manufacturer: LSC
    name: Floodlight with sensor
entities:
  - entity: light
    dps:
      - id: 20
        type: boolean
        name: switch
      - id: 21
        type: string
        name: work_mode
      - id: 22
        name: brightness
        type: integer
        range:
          min: 10
          max: 1000
      - id: 23
        name: color_temp
        type: integer
        optional: true
        range:
          min: 0
          max: 1000
        mapping:
          - target_range:
              min: 2700
              max: 6500
  - entity: number
    translation_key: timer
    class: duration
    category: config
    dps:
      - id: 26
        name: value
        type: integer
        optional: true
        range:
          min: 0
          max: 86400
        unit: min
        mapping:
          - scale: 60
            step: 60
          - dps_val: null
  - entity: switch
    name: Manual mode
    category: config
    dps:
      - id: 51
        type: string
        name: switch
        mapping:
          - dps_val: auto
            value: false
          - dps_val: manual
            value: true
        optional: true
        force: true
  - entity: switch
    name: PIR enabled
    category: config
    dps:
      - id: 56
        type: boolean
        name: switch
        optional: true
        force: true
  - entity: event
    class: motion
    dps:
      - id: 52
        type: string
        name: event
        mapping:
          - dps_val: pir
            value: detected
          - dps_val: none
            value: clear
  - entity: select
    name: Motion distance
    category: config
    dps:
      - id: 54
        type: string
        name: option
        mapping:
          - dps_val: "high"
            value: "Far"
          - dps_val: "low"
            value: "Near"
          - dps_val: "middle"
            value: "Medium"
        optional: true
        force: true
  - entity: number
    name: Full light duration
    category: config
    icon: "mdi:timer"
    dps:
      - id: 55
        name: value
        type: integer
        range:
          min: 5
          max: 3600
        unit: s
        optional: true
        force: true
  - entity: number
    name: Standby delay
    category: config
    dps:
      - id: 58
        name: value
        type: integer
        range:
          min: 1
          max: 480
        unit: min
        mapping:
          - scale: 1
          - dps_val: null
        optional: true
        force: true
  - entity: number
    name: Standby bright
    category: config
    dps:
      - id: 59
        name: value
        type: integer
        range:
          min: 0
          max: 1000
        unit: min
        mapping:
          - scale: 1
          - dps_val: null
        optional: true
        force: true
  - entity: select
    name: Ambient light sensor
    category: config
    dps:
      - id: 53
        type: string
        name: option
        mapping:
          - dps_val: 10lux
            value: 10lux
          - dps_val: 2000lux
            value: 2000lux
          - dps_val: 300lux
            value: 300lux
          - dps_val: 50lux
            value: 50lux
          - dps_val: 10lux
            value: 10lux
          - dps_val: 5lux
            value: 5lux
          - dps_val: now
            value: Now
        optional: true
        force: true
