name: Air purifier
products:
  - id: 3hjcrjktvkoim7zu
    name: Tesla Air Pro M
primary_entity:
  entity: fan
  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: normal
    - id: 4
      name: speed
      type: string
      mapping:
        - dps_val: "sleep"
          value: 25
        - dps_val: "low"
          value: 50
        - dps_val: "mid"
          value: 75
        - dps_val: "high"
          value: 100
secondary_entities:
  - entity: light
    category: config
    dps:
      - id: 8
        name: switch
        type: boolean
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 6
        name: switch
        type: boolean
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 9
        name: switch
        type: boolean
  - entity: sensor
    name: Filter
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 5
        type: integer
        name: sensor
        unit: "%"
  - entity: sensor
    category: diagnostic
    class: temperature
    dps:
      - id: 12
        type: integer
        name: sensor
        class: measurement
        unit: "°C"
  - entity: sensor
    category: diagnostic
    class: humidity
    dps:
      - id: 13
        type: integer
        name: sensor
        class: measurement
        unit: "%"
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 18
        type: string
        name: option
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: "1h"
            value: "1h"
          - dps_val: "4h"
            value: "4h"
          - dps_val: "8h"
            value: "8h"
  - entity: sensor
    class: pm25
    category: diagnostic
    dps:
      - id: 2
        type: integer
        name: sensor
        class: measurement
        unit: ugm3
