name: Air purifier
products:
  - id: xhrfqobcbyk2br0z
    name: NX-100AP Rapid
primary_entity:
  entity: fan
  translation_only_key: fan_with_presets
  icon: "mdi:air-purifier"
  dps:
    - id: 1
      name: switch
      type: boolean
    - id: 3
      name: preset_mode
      type: string
      mapping:
        - dps_val: Sleep
          value: sleep
        - dps_val: M
          value: normal
        - dps_val: H
          value: strong
        - dps_val: Auto
          value: smart
secondary_entities:
  - entity: sensor
    translation_key: time_remaining
    class: duration
    dps:
      - id: 19
        name: sensor
        type: integer
        unit: min
  - entity: sensor
    name: Air quality
    class: enum
    icon: "mdi:air-filter"
    dps:
      - id: 21
        name: sensor
        type: string
        mapping:
          - dps_val: "good"
            value: "Good"
          - dps_val: "medium"
            value: "Medium"
          - dps_val: "severe"
            value: "Severe"
  - entity: sensor
    class: pm25
    dps:
      - id: 2
        name: sensor
        type: integer
        class: measurement
        unit: ugm3
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 18
        type: string
        name: option
        mapping:
          - dps_val: Cancel
            value: cancel
          - dps_val: "2H"
            value: "2h"
          - dps_val: "4H"
            value: "4h"
          - dps_val: "6H"
            value: "6h"
          - dps_val: "8H"
            value: "8h"
          - dps_val: "10H"
            value: "10h"
          - dps_val: "12H"
            value: "12h"
          - dps_val: "24H"
            value: "24h"
  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 11
        type: boolean
        name: button
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 6
        name: switch
        type: boolean
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 9
        name: switch
        type: boolean
  - entity: sensor
    name: Filter used
    category: diagnostic
    icon: "mdi:ticket-percent-outline"
    dps:
      - id: 5
        name: sensor
        type: integer
        unit: "%"
  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 22
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 0
            value: false
          - value: true
