name: Goldair dehumidifier
products:
  - id: okwjubkm9ndbq3j
    name: GPDH340
primary_entity:
  entity: humidifier
  class: dehumidifier
  dps:
    - id: 1
      name: switch
      type: boolean
      mapping:
        - dps_val: false
          icon: "mdi:air-humidifier-off"
          icon_priority: 3
        - dps_val: true
          icon: "mdi:air-humidifier"
          icon_priority: 4
    - id: 2
      name: mode
      type: string
      mapping:
        - dps_val: "2"
          value: normal
          hidden: true
        - dps_val: "4"
          value: sleep
        - dps_val: "5"
          value: comfort
        - dps_val: "6"
          value: eco
        - dps_val: "7"
          value: boost
    - id: 4
      type: integer
      name: humidity
      range:
        min: 35
        max: 80
      mapping:
        - step: 5
    - id: 11
      type: bitfield
      name: error
      mapping:
        - dps_val: 16
          value: Tank full or missing
          icon: "mdi:cup-water"
          icon_priority: 1
        - dps_val: 0
          value: OK
    - id: 104
      type: integer
      name: current_humidity
    - id: 105
      type: integer
      name: model_code
    - id: 108
      type: boolean
      name: filter_clean_required
      mapping:
        - dps_val: true
          icon: "mdi:air-filter"
          icon_priority: 2
      hidden: true
    - id: 109
      # manual says not available for GPDH340, so not split into switch
      type: boolean
      name: pump
secondary_entities:
  - entity: fan
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 6
        type: string
        name: speed
        mapping:
          - dps_val: "1"
            value: 33
          - dps_val: "2"
            value: 67
          - dps_val: "3"
            value: 100
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 107
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 106
        type: boolean
        name: lock
  - entity: sensor
    class: temperature
    dps:
      - id: 103
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: binary_sensor
    translation_key: tank_full
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 16
            value: true
          - value: false
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - dps_val: 16
            value: false
          - value: true
  - entity: binary_sensor
    name: Filter clean required
    class: problem
    category: diagnostic
    dps:
      - id: 108
        type: boolean
        name: sensor
