name: Humidifier
products:
  - id: rjhsz1vaxpp4gih3
    manufacturer: AlecoAir
    model: PU55 Humino

entities:
  - entity: humidifier
    class: humidifier
    dps:
      - id: 105
        name: switch
        type: boolean
      - id: 101
        name: humidity
        type: integer
        range:
          min: 30
          max: 70
        mapping:
          - step: 5
      - id: 13
        name: current_humidity
        type: integer

  - entity: fan
    translation_key: fan_with_presets
    name: Purifier
    dps:
      - id: 1
        name: switch
        type: boolean
      - id: 4
        name: speed
        type: string
        mapping:
          - dps_val: low
            value: 25
          - dps_val: mid
            value: 50
          - dps_val: high
            value: 75
          - dps_val: max
            value: 100
      - id: 3
        name: preset_mode
        type: string
        mapping:
          - dps_val: normal
            value: normal
          - dps_val: ai_clean
            value: AI Clean
          - dps_val: sleep
            value: sleep

  - entity: sensor
    translation_key: filter_life
    dps:
      - id: 5
        name: sensor
        type: integer
        unit: "%"
        class: measurement

  - entity: sensor
    class: humidity
    dps:
      - id: 13
        name: sensor
        type: integer
        unit: "%"
        class: measurement

  - entity: sensor
    translation_key: air_quality
    dps:
      - id: 21
        name: sensor
        type: string

  - entity: sensor
    name: Clean water tank
    icon: mdi:water-opacity
    dps:
      - id: 106
        name: sensor
        type: integer
        unit: "%"
        class: measurement

  - 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: switch
    translation_key: sound
    category: config
    dps:
      - id: 28
        name: switch
        type: boolean
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true

  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 103
        name: switch
        type: boolean
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true

  - entity: switch
    name: Dry Fan
    category: config
    dps:
      - id: 104
        name: switch
        type: boolean

  - entity: number
    translation_key: timer
    class: duration
    dps:
      - id: 102
        name: value
        type: integer
        unit: h
        range:
          min: 1
          max: 24

  - entity: switch
    name: Constant mist
    dps:
      - id: 10
        name: switch
        type: boolean
        mapping:
          - dps_val: true
            icon: mdi:air-humidifier
          - dps_val: false
            icon: mdi:air-humidifier-off
