name: Dehumidifier
products:
  - id: gcthce4ejb8nzgow
    manufacturer: AlecoAir
    model: D12 ECO 2.0
  - id: 55e916oobezauqfb
    manufacturer: Orbegozo
    model: DHW 2080
entities:
  - entity: humidifier
    class: dehumidifier
    translation_only_key: extended
    dps:
      - id: 1
        name: switch
        type: boolean
      - id: 2
        name: humidity
        type: integer
        range:
          min: 20
          max: 95
        mapping:
          - step: 5
            constraint: is_orbegozo
            conditions:
              - dps_val: [Strong, Auto]
                range:
                  min: 30
                  max: 80
      - id: 5
        name: mode
        type: string
        mapping:
          - dps_val: Continuous
            value: continuous
            available: is_aleco
          - dps_val: Sunny_Day
            value: eco
            available: is_aleco
          - dps_val: Rain_Day
            value: normal
            available: is_aleco
          - dps_val: Strong
            value: laundry
            available: is_orbegozo
          - dps_val: Auto
            value: auto
            available: is_orbegozo
      - id: 6
        name: current_humidity
        type: integer
      - id: 5
        name: is_alecco
        type: string
        mapping:
          - value: false
            conditions:
              - dps_val: [Continuous, Sunny_Day, Rain_Day]
                value: true
      - id: 5
        name: is_orbegozo
        type: string
        mapping:
          - value: false
            conditions:
              - dps_val: [Strong, Auto]
                value: true
  - entity: fan
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 4
        type: string
        name: speed
        mapping:
          - dps_val: low
            value: 50
          - dps_val: high
            value: 100
  - entity: sensor
    class: temperature
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: switch
    translation_key: sleep
    category: config
    dps:
      - id: 14
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 16
        type: boolean
        name: lock
  - entity: binary_sensor
    translation_key: tank_full
    dps:
      - id: 19
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 1
            value: true
          - value: false
  - entity: binary_sensor
    class: problem
    dps:
      - id: 19
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - dps_val: 1
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 19
        type: bitfield
        name: fault_code
      - id: 19
        name: description
        type: bitfield
        mapping:
          - dps_val: 0
            value: OK
          - dps_val: 1
            value: "Water Tank Full or Removed"
          - dps_val: 2
            # E2 might be a compressor fault.
            value: "E2 Compressor Fault"
          - dps_val: 4
            value: "Cleaning needed"
