name: JJPro JPD01 dehumidifier
products:
  - id: j4aeex9xltjayqxf
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: 5
    - id: 2
      name: mode
      type: string
      mapping:
        - dps_val: "0"
          value: normal
          icon: "mdi:water-outline"
          icon_priority: 4
        - dps_val: "1"
          value: boost
          icon: "mdi:water-plus-outline"
          icon_priority: 4
        - dps_val: "2"
          value: laundry
          icon: "mdi:tshirt-crew-outline"
          icon_priority: 4
        - dps_val: "3"
          value: purify
          icon: "mdi:tailwind"
          icon_priority: 4
    - id: 4
      type: integer
      name: humidity
      range:
        min: 30
        max: 80
      mapping:
        - step: 5
    - id: 11
      type: bitfield
      name: error
      mapping:
        - dps_val: 8
          value: "Tank full or missing"
          icon: "mdi:cup-water"
          icon_priority: 1
        - dps_val: 0
          value: "OK"
    - id: 101
      type: boolean
      name: unknown_101
    - id: 104
      type: integer
      name: current_humidity
    - id: 105
      type: boolean
      name: defrosting
      hidden: true
      mapping:
        - dps_val: true
          icon: "mdi:snowflake-melt"
          icon_priority: 2
secondary_entities:
  - entity: fan
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 6
        type: string
        name: speed
        mapping:
          - dps_val: "1"
            value: 50
          - dps_val: "3"
            value: 100
  - entity: switch
    translation_key: ionizer
    dps:
      - id: 5
        type: boolean
        name: switch
  - entity: switch
    translation_key: sleep
    dps:
      - id: 102
        type: boolean
        name: switch
  - 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: 0
            value: false
          - value: true
  - entity: binary_sensor
    translation_key: defrost
    category: diagnostic
    dps:
      - id: 105
        type: boolean
        name: sensor
  - entity: number
    translation_key: timer
    category: config
    dps:
      - id: 12
        name: value
        type: integer
        unit: h
        range:
          min: 0
          max: 24
