name: Air purifier
products:
  - id: giwqfeiezesbkkbe
    manufacturer: Proscenic
    model: A9
entities:
  - entity: fan
    icon: "mdi:air-purifier"
    translation_only_key: fan_with_presets
    dps:
      - id: 1
        name: switch
        type: boolean
      - id: 4
        name: preset_mode
        type: string
        mapping:
          - dps_val: "Sleep"
            value: sleep
          - dps_val: "1"
            value: low
          - dps_val: "2"
            value: medium
          - dps_val: "3"
            value: high
          - dps_val: "4"
            value: turbo
          - dps_val: "Auto"
            value: auto
      - id: 4
        name: speed
        type: string
        mapping:
          - dps_val: "Sleep"
            value: 20
          - dps_val: "1"
            value: 40
          - dps_val: "2"
            value: 60
          - dps_val: "3"
            value: 80
          - dps_val: "4"
            value: 100
          - dps_val: "Auto"
            value: 0
      - id: 102
        name: unknown_102
        type: string
  - entity: sensor
    class: pm25
    dps:
      - id: 2
        name: sensor
        class: measurement
        type: integer
        unit: ugm3
  - entity: light  # this is inverted (false = light on)
    category: config
    translation_key: display
    dps:
      - id: 8
        name: switch
        type: boolean
        mapping:
          - dps_val: false
            value: true
          - dps_val: true
            value: false
  - entity: sensor
    name: Filter usage
    category: diagnostic
    icon: "mdi:shield-bug"
    dps:
      - id: 5
        name: sensor
        type: integer
        unit: "%"
  - entity: button
    name: Reset filter
    category: config
    icon: "mdi:air-filter"
    dps:
      - id: 11
        name: button
        type: boolean
  - entity: sensor
    name: Filter hours left
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 16
        name: sensor
        type: integer
        unit: h
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        type: boolean
        name: lock
  - entity: sensor
    name: Filtered air
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 104
        name: sensor
        type: integer
        optional: true
        unit: m³
  - entity: sensor
    translation_key: air_quality
    class: enum
    dps:
      - id: 21
        name: sensor
        type: string
        mapping:
          - dps_val: mild
            value: excellent
          - dps_val: good
            value: good
          - dps_val: medium
            value: poor
          - dps_val: severe
            value: severe
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 101
        type: integer
        name: option
        mapping:
          - dps_val: 0
            value: cancel
          - dps_val: 1
            value: "1h"
          - dps_val: 2
            value: "2h"
          - dps_val: 4
            value: "4h"
          - dps_val: 8
            value: "8h"
