name: Kogan Air Purifier
products:
  - id: 5cum0gfsx8rhpvvl
    name: Kogan Air Purifier KAIRPRFR2SA
primary_entity:
  entity: fan
  translation_only_key: fan_with_presets
  dps:
    - id: 1
      type: boolean
      name: switch
    - id: 4
      type: string
      name: preset_mode
      mapping:
        - dps_val: 1
          value: "sleep"
        - dps_val: 2
          value: "strong"
        - dps_val: 3
          value: "smart"
secondary_entities:
  - entity: sensor
    name: Filter remaining
    icon: "mdi:shield-bug"
    dps:
      - id: 5
        name: sensor
        type: integer
        unit: "%"
  - entity: light
    category: config
    dps:
      - id: 101
        type: string
        name: brightness
        mapping:
          - dps_val: cancle
            value: 0
          - dps_val: 1
            value: 128
          - dps_val: 2
            value: 255
  - entity: button
    name: Filter reset
    category: config
    class: restart
    dps:
      - id: 11
        type: boolean
        name: button
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 19
        type: string
        name: option
        mapping:
          - dps_val: 1
            value: cancel
          - dps_val: 2
            value: "4h"
          - dps_val: 3
            value: "8h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    dps:
      - id: 20
        name: sensor
        type: integer
        unit: min
  - entity: sensor
    name: Air quality
    class: enum
    icon: "mdi:air-filter"
    dps:
      - id: 22
        name: sensor
        type: string
        mapping:
          - dps_val: 1
            value: "Good"
          - dps_val: 2
            value: "Normal"
          - dps_val: 3
            value: "Poor"
          - dps_val: 4
            value: "Severe"
