name: Air purifier
primary_entity:
  entity: fan
  translation_key: fan_with_presets
  icon: "mdi:air-purifier"
  dps:
    - id: 1
      type: boolean
      name: switch
    - id: 3
      name: preset_mode
      type: string
      mapping:
        - dps_val: auto
          value: smart
        - dps_val: M
          value: normal
        - dps_val: H
          value: strong
        - dps_val: sleep
          value: sleep
secondary_entities:
  - entity: switch
    deprecated: fan
    icon: "mdi:air-purifier"
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: sensor
    name: Active filter life
    icon: "mdi:air-filter"
    category: diagnostic
    dps:
      - id: 5
        type: integer
        name: sensor
        unit: "%"
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        type: boolean
        name: lock
  - entity: select
    name: Light
    category: config
    dps:
      - id: 101
        name: option
        type: string
        mapping:
          - dps_val: Standard
            value: "On"
            icon: "mdi:lightbulb-on"
          - dps_val: Soft
            value: "Soft"
            icon: "mdi:lightbulb-on-outline"
          - dps_val: Close
            value: "Off"
            icon: "mdi:lightbulb-outline"
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 9
        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: 18
        name: option
        type: string
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: 2h
            value: "2h"
          - dps_val: 4h
            value: "4h"
          - dps_val: 8h
            value: "8h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 19
        type: integer
        name: sensor
        unit: min
  - entity: sensor
    class: pm25
    dps:
      - id: 2
        type: integer
        name: sensor
        class: measurement
        unit: ugm3
  - entity: sensor
    name: Air quality
    dps:
      - id: 21
        type: string
        name: sensor
  - entity: select
    name: Mode
    deprecated: fan
    dps:
      - id: 3
        name: option
        type: string
        mapping:
          - dps_val: auto
            value: Auto
          - dps_val: M
            value: Medium
          - dps_val: H
            value: High
          - dps_val: sleep
            value: Sleep
