name: Air purifier
products:
  - id: 5cum0gfsx8rhpvvl
    manufacturer: Kogan
    model: 2S
    model_id: KAIRPRFR2SA
entities:
  - 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"
  - 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
    translation_key: filter_reset
    category: config
    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
    translation_key: air_quality
    class: enum
    dps:
      - id: 22
        name: sensor
        type: string
        mapping:
          - dps_val: "1"
            value: good
          - dps_val: "2"
            value: moderate
          - dps_val: "3"
            value: poor
          - dps_val: "4"
            value: severe
