name: Air purifier
products:
  - id: vpb3fd5rhtgd7b4t
    manufacturer: Jafanda
    model: JF260S
entities:
  - entity: fan
    translation_key: fan_with_presets
    name: Purifier
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 3
        type: string
        name: preset_mode
        mapping:
          - dps_val: manual
            value: manual
          - dps_val: auto
            value: auto
          - dps_val: sleep
            value: sleep
      - id: 102
        type: integer
        name: speed
        range:
          min: 1
          max: 5
  - entity: sensor
    class: pm25
    dps:
      - id: 2
        type: integer
        name: sensor
        unit: ugm3
        class: measurement
  - entity: sensor
    translation_key: filter_life
    category: diagnostic
    dps:
      - id: 5
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        type: boolean
        name: lock
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 8
        type: boolean
        name: switch
  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 11
        type: boolean
        optional: true
        name: button
  - entity: sensor
    translation_key: air_quality
    class: enum
    dps:
      - id: 21
        type: string
        name: sensor
        mapping:
          - dps_val: great
            value: excellent
          - dps_val: good
            value: good
          - dps_val: mild
            value: moderate
          - dps_val: medium
            value: poor
          - dps_val: severe
            value: severe
  - entity: light
    name: Atmosphere lamp
    category: config
    dps:
      - id: 101
        name: brightness
        type: string
        mapping:
          - dps_val: "0"
            value: 0
          - dps_val: "1"
            value: 85
          - dps_val: "2"
            value: 170
          - dps_val: "3"
            value: 255
  - entity: number
    translation_key: timer
    class: duration
    category: config
    dps:
      - id: 103
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 12
