name: Air purifier
products:
  - id: okhgq3wuhlmg03xz
    manufacturer: Siguro
    model: Air Master
    model_id: AP-K50
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: auto
            value: auto
          - dps_val: sleep
            value: sleep
          - dps_val: "1"
            value: low
          - dps_val: "2"
            value: medium
          - dps_val: "3"
            value: high
  - entity: sensor
    class: pm25
    dps:
      - id: 2
        type: integer
        name: sensor
        unit: ugm3
        class: measurement
  - entity: sensor
    translation_key: filter_life
    category: diagnostic
    dps:
      - id: 5
        type: integer
        optional: true
        name: sensor
        unit: "%"
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 6
        type: boolean
        name: switch
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 8
        type: boolean
        name: switch
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 9
        type: boolean
        name: switch
  - 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: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 19
        type: integer
        name: sensor
        unit: min
        class: measurement
  - 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
          - dps_val: severe
            value: severe
  - 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: select
    translation_key: temperature_unit
    category: config
    hidden: true  # not documented, and no temperature readings
    dps:
      - id: 23
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
