name: Air purifier
products:
  - id: lpmzzlrklbkvsizu
    manufacturer: "TrueLife"
    model: "Air Purifier P7 WIFI"
entities:
  - entity: fan
    icon: "mdi:air-purifier"
    translation_only_key: fan_with_presets
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 3
        name: preset_mode
        type: string
        mapping:
          - dps_val: AUTO
            value: smart
          - dps_val: SLEEP
            value: sleep
          - dps_val: MANUAL
            value: manual
      - id: 4
        type: string
        name: speed
        mapping:
          - dps_val: LOW
            value: 33
          - dps_val: MID
            value: 66
          - dps_val: HI
            value: 100
  - entity: sensor
    class: pm25
    category: diagnostic
    dps:
      - id: 2
        type: integer
        name: sensor
        unit: ugm3
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 6
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        type: boolean
        name: lock
  - 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: sensor
    translation_key: filter_life
    category: diagnostic
    class: duration
    dps:
      - id: 16
        type: integer
        name: sensor
        unit: h
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 18
        type: string
        name: option
        mapping:
          - dps_val: cancle
            value: cancel
          - dps_val: 1h
            value: 1h
          - dps_val: 2h
            value: 2h
          - dps_val: 3h
            value: 3h
          - dps_val: 4h
            value: 4h
          - dps_val: 5h
            value: 5h
          - dps_val: 6h
            value: 6h
          - dps_val: 7h
            value: 7h
          - dps_val: 8h
            value: 8h
  - entity: sensor
    translation_key: time_remaining
    category: diagnostic
    class: duration
    dps:
      - id: 19
        type: integer
        name: sensor
        unit: min
