name: Portable air conditioner
products:
  - id: RVkMAF3PdJerCQee
    manufacturer: Igenix
    model: IG9901WIFI

entities:
  - entity: climate
    dps:
      - id: 1
        name: hvac_mode
        type: boolean
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            constraint: mode
            conditions:
              - dps_val: cold
                value: cool
              - dps_val: dry
                value: dry
              - dps_val: fan
                value: fan_only
      - id: 2
        name: temperature
        type: integer
        unit: C
        range:
          min: 16
          max: 30
      - id: 3
        name: current_temperature
        type: integer
      - id: 4
        name: mode
        type: string
        hidden: true
      - id: 5
        name: fan_mode
        type: integer
        mapping:
          - dps_val: 1
            value: low
          - dps_val: 2
            value: medium
          - dps_val: 3
            value: high
      - id: 101
        name: preset_mode
        type: boolean
        mapping:
          - dps_val: true
            value: sleep
          - dps_val: false
            value: home
      - id: 104
        name: swing_mode
        type: boolean
        mapping:
          - dps_val: true
            value: "on"
          - dps_val: false
            value: "off"

  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 19
        name: option
        type: string
        mapping:
          - dps_val: C
            value: celsius
          - dps_val: F
            value: fahrenheit

  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 105
        name: sensor
        type: integer
        unit: min

  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 106
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 106
        type: bitfield
        name: fault_code

  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 103
        type: integer
        name: option
        optional: true
        unit: h
        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"
