name: Dehumidifier
# products: Inventor Eva Ion Pro
entities:
  - entity: humidifier
    class: dehumidifier
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 2
        type: integer
        name: humidity
        range:
          min: 35
          max: 85
        mapping:
          - step: 5
      - id: 5
        type: string
        name: mode
        mapping:
          - dps_val: manual
            value: normal
          - dps_val: continuous
            value: boost
          - dps_val: smart
            value: auto
          - dps_val: drying
            value: laundry
      - id: 6
        type: integer
        name: current_humidity
      # The following two are documented in the protocol as
      # read/write, and appear in the app to be so.  But there is no
      # mention in the manual of a pump and likely this is an
      # indicator that the compressor is operating.  Water level also
      # seems more likely to be an indicator.  If known for sure, they
      # can be moved to sensors (or switch/number if they are really
      # configurable)
      - id: 103
        type: boolean
        name: pump
      - id: 104
        type: integer
        optional: true
        name: water_level
  - entity: fan
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 4
        type: string
        name: speed
        mapping:
          - dps_val: low
            value: 33
          - dps_val: middle
            value: 66
          - dps_val: high
            value: 100
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 10
        type: boolean
        name: switch
  - entity: sensor
    class: temperature
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 19
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
            # Tank has its own binary sensor
          - dps_val: 4
            value: false
          - value: true
      - id: 19
        type: bitfield
        name: fault_code
  - entity: binary_sensor
    translation_key: tank_full
    category: diagnostic
    dps:
      - id: 101
        type: boolean
        name: sensor
