name: Air Purifier
products:
  - id: pwrmggdhwkz1lnvh
    manufacturer: Smartmi
    model: E1
entities:
  - entity: fan
    translation_only_key: fan_with_presets
    icon: "mdi:air-purifier"
    dps:
      - id: 1
        name: switch
        type: boolean
      - id: 3
        name: preset_mode
        type: string
        mapping:
          - dps_val: sleep
            value: sleep
          - dps_val: auto
            value: normal
          - dps_val: manual
            value: strong
  - entity: light
    translation_key: indicator
    category: config
    dps:
      - id: 8
        name: switch
        type: boolean
  - entity: sensor
    name: Filter usage
    category: diagnostic
    class: duration
    icon: "mdi:shield-bug"
    dps:
      - id: 101
        name: sensor
        type: integer
        unit: h
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 22
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 22
        type: bitfield
        name: fault_code
