name: Air purifier
products:
  - id: 7v1gn9wmbqvtcqkc
    manufacturer: Tesla Smart
    model: S300
entities:
  - entity: fan
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 4
        type: string
        name: speed
        mapping:
          - dps_val: "1"
            value: 14
          - dps_val: "2"
            value: 28
          - dps_val: "3"
            value: 42
          - dps_val: "4"
            value: 57
          - dps_val: "5"
            value: 71
          - dps_val: "6"
            value: 85
          - dps_val: "7"
            value: 100
  - entity: sensor
    class: pm25
    category: diagnostic
    dps:
      - id: 2
        type: integer
        name: sensor
        unit: ugm3
        class: measurement
  - entity: sensor
    translation_key: filter_life
    category: diagnostic
    dps:
      - id: 5
        type: integer
        name: sensor
        unit: "%"
  - 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
        optional: true
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - 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
        optional: true
        name: button
  - 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: "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"
          - dps_val: "9h"
            value: "9h"
          - dps_val: "10h"
            value: "10h"
          - dps_val: "11h"
            value: "11h"
          - dps_val: "12h"
            value: "12h"
  - entity: sensor
    translation_key: air_quality
    class: enum
    category: diagnostic
    dps:
      - id: 21
        type: string
        name: sensor
        mapping:
          - dps_val: great
            value: excellent
          - dps_val: mild
            value: moderate
          - dps_val: good
            value: good
          - dps_val: medium
            value: poor
  - 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
  - entity: switch
    translation_key: sound
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
  - entity: light
    dps:
      - id: 105
        type: string
        name: switch
        mapping:
          - dps_val: "off"
            value: false
          - dps_val: yellow
            value: true
      - id: 105
        type: string
        name: named_color
        mapping:
          - dps_val: "off"
            value: black
          - dps_val: orange
            value: orange
          - dps_val: green
            value: green
          - dps_val: blue
            value: blue
          - dps_val: yellow
            value: yellow
