name: Dehumidifier
products:
  - id: 3qucgevhiflgbxzj
    manufacturer: Rohnson
    model: R-9530
entities:
  - entity: humidifier
    class: dehumidifier
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 2
        type: integer
        name: humidity
        range:
          min: 40
          max: 70
      - id: 5
        type: string
        name: mode
        mapping:
          - dps_val: auto
            value: auto
          - dps_val: sleep
            value: sleep
          - dps_val: clothes_dry
            value: laundry
      - id: 6
        type: integer
        name: current_humidity
  - entity: sensor
    class: temperature
    dps:
      - id: 7
        type: integer
        name: sensor
        class: measurement
      - id: 24
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: switch
    translation_key: ionizer
    category: config
    dps:
      - id: 10
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 16
        type: boolean
        name: lock
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 18
        type: integer
        optional: true
        name: sensor
        unit: min
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 19
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 19
        type: bitfield
        name: fault_code
  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 20
        type: boolean
        name: button
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 24
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: binary_sensor
    translation_key: tank_full
    category: diagnostic
    dps:
      - id: 25
        type: string
        name: sensor
        mapping:
          - dps_val: "off"
            value: false
          - dps_val: "on"
            value: true
  - entity: light
    translation_key: indicator
    dps:
      - id: 30
        name: brightness
        type: integer
        range:
          min: 0
          max: 2
  - entity: switch
    name: Dry after off
    icon: "mdi:fan-clock"
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: sensor
    translation_key: time_remaining
    name: Drying time remaining
    category: diagnostic
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: min
        class: measurement
  - entity: binary_sensor
    name: Warming up
    class: cold
    category: diagnostic
    dps:
      - id: 103
        type: boolean
        optional: true
        name: sensor
        mapping:
          - dps_val: null
            value: false
  - entity: switch
    name: Alarm
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
  - entity: number
    name: "Off timer"
    translation_key: timer
    class: duration
    category: config
    dps:
      - id: 105
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 1440
  - entity: number
    name: "On timer"
    category: config
    class: duration
    translation_key: timer
    dps:
      - id: 106
        type: integer
        optional: true
        name: value
        unit: min
        range:
          min: 0
          max: 240
  - entity: switch
    name: Drying
    category: config
    dps:
      - id: 107
        type: boolean
        name: switch
  - entity: event
    name: Fault
    dps:
      - id: 108
        type: string
        name: event
        mapping:
          - dps_val: no_error
            value: null
          - value: alert
      - id: 108
        type: string
        name: fault_code
  - entity: switch
    name: Energy saving
    category: config
    dps:
      - id: 109
        type: boolean
        name: switch
