name: Air purifier
products:
  - id: y7iiubdc5sufjvo3
    manufacturer: NAC
    model: AP470
entities:
  - entity: fan
    icon: "mdi:air-purifier"
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 4
        type: string
        name: preset_mode
        mapping:
          - dps_val: 1
            value: Auto
          - dps_val: 2
            value: Sleep
          - dps_val: 3
            value: Level 1
          - dps_val: 4
            value: Level 2
          - dps_val: 4
            value: Level 3
          - dps_val: 6
            value: Level 4
  - entity: sensor
    class: pm25
    dps:
      - id: 2
        type: integer
        name: sensor
        class: measurement
        unit: ugm3
  - entity: sensor
    name: Filter left days
    icon: "mdi:air-filter"
    category: diagnostic
    class: duration
    dps:
      - id: 16
        type: integer
        name: sensor
        unit: "d"
  - entity: sensor
    name: Total time
    icon: "mdi:air-filter"
    category: diagnostic
    class: duration
    dps:
      - id: 17
        type: integer
        name: sensor
        unit: "h"
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 6
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        type: boolean
        name: lock
  - entity: switch
    name: Disable light
    category: config
    icon: "mdi:lightbulb"
    dps:
      - id: 8
        type: boolean
        name: switch
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 9
        type: boolean
        name: switch
  - entity: switch
    name: Filter clean
    category: config
    icon: "mdi:air-filter"
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 11
        type: boolean
        name: button
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 19
        name: option
        type: string
        optional: true
        mapping:
          - dps_val: cancle
            value: cancel
          - dps_val: 2
            value: "2h"
          - dps_val: 4
            value: "4h"
          - dps_val: 6
            value: "6h"
          - dps_val: 8
            value: "8h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 20
        type: integer
        name: sensor
        unit: "min"
        optional: true
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 21
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 21
        type: bitfield
        name: fault_code
