name: Dehumidifier
legacy_type: alecoair_d12_home_dehumidifier
products:
  - id: hp1sjssyokokbrsg
    manufacturer: AlecoAir
    model: D12/D16 Home
  - id: to4nyl9qxvkqmcmk
    manufacturer: Klarstein
    model: DryFy Connect
  - id: fvxjwu2oggajswbx
    manufacturer: Shinco
    model: SDZ/YDZ-series
entities:
  - entity: humidifier
    class: dehumidifier
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 2
        type: string
        name: mode
        mapping:
          - dps_val: "0"
            value: auto
          - dps_val: "1"
            value: boost
      - id: 3
        type: integer
        name: current_humidity
      - id: 4
        type: integer
        name: humidity
        range:
          min: 25
          max: 80
  - entity: fan
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 6
        type: string
        name: speed
        mapping:
          - dps_val: "0"
            value: 100
          - dps_val: "1"
            value: 50
      - id: 8
        type: boolean
        optional: true
        name: oscillate
        mapping:
          - dps_val: null
            invalid: true
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 5
        type: boolean
        name: switch
        optional: true
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        type: boolean
        name: lock
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 1
            value: true
          - dps_val: 2
            value: true
          - dps_val: 16
            value: true
          - dps_val: 32
            value: true
          - value: false
      - id: 11
        type: bitfield
        name: fault_code
  - entity: binary_sensor
    translation_key: tank_full
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 8
            value: true
          - value: false
  - entity: binary_sensor
    translation_key: defrost
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 4
            value: true
          - value: false
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 12
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "0"
            value: cancel
          - dps_val: "1"
            value: "1h"
          - dps_val: "2"
            value: "2h"
          - dps_val: "3"
            value: "3h"
          - dps_val: "4"
            value: "4h"
          - dps_val: "5"
            value: "5h"
          - dps_val: "6"
            value: "6h"
          - dps_val: "7"
            value: "7h"
          - dps_val: "8"
            value: "8h"
          - dps_val: "9"
            value: "9h"
          - dps_val: "10"
            value: "10h"
          - dps_val: "11"
            value: "11h"
          - dps_val: "12"
            value: "12h"
          - dps_val: "13"
            value: "13h"
          - dps_val: "14"
            value: "14h"
          - dps_val: "15"
            value: "15h"
          - dps_val: "16"
            value: "16h"
          - dps_val: "17"
            value: "17h"
          - dps_val: "18"
            value: "18h"
          - dps_val: "19"
            value: "19h"
          - dps_val: "20"
            value: "20h"
          - dps_val: "21"
            value: "21h"
          - dps_val: "22"
            value: "22h"
          - dps_val: "23"
            value: "23h"
          - dps_val: "24"
            value: "24h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 13
        type: integer
        name: sensor
        unit: min
  - entity: switch
    name: Inside drying
    category: config
    icon: "mdi:hair-dryer"
    dps:
      - id: 101
        type: boolean
        name: switch
        optional: true
        persist: false
        mapping:
          - dps_val: null
            value: false
  - entity: switch
    name: Water pump
    icon: "mdi:water-pump"
    category: config
    dps:
      - id: 102
        type: boolean
        optional: true
        name: switch
