name: Air purifier
products:
  - id: xhrfqobcbyk2br0z
    model: NX-100AP Rapid
entities:
  - 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
  - entity: sensor
    translation_key: time_remaining
    class: duration
    dps:
      - id: 19
        name: sensor
        type: integer
        unit: min
  - entity: sensor
    translation_key: air_quality
    class: enum
    dps:
      - id: 21
        name: sensor
        type: string
        mapping:
          - dps_val: good
            value: good
          - dps_val: medium
            value: poor
          - 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
      - id: 22
        type: bitfield
        name: fault_code
