name: Portable air conditioner
products:
  - id: keyj38wgshgk7jcn
    manufacturer: SmartDGM
    model: PAC-W11C01
entities:
  - entity: climate
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: fan_only
            constraint: mode
            conditions:
              - dps_val: "0"
                value: heat_cool
              - dps_val: "2"
                value: dry
              - dps_val: "3"
                value: cool
              - dps_val: "4"
                value: fan_only
      - id: 5
        type: string
        name: mode
        hidden: true
      - id: 6
        type: integer
        name: temperature
        range:
          min: 13
          max: 32
        mapping:
          - constraint: temperature_unit
            conditions:
              - dps_val: true
                value_redirect: temp_set_f
                range:
                  min: 55
                  max: 90
      - id: 8
        type: string
        name: fan_mode
        mapping:
          - dps_val: "0"
            value: auto
          - dps_val: "1"
            value: low
          - dps_val: "2"
            value: medium
          - dps_val: "3"
            value: high
      - id: 10
        type: boolean
        name: temperature_unit
        mapping:
          - dps_val: false
            value: C
          - dps_val: true
            value: F
      - id: 16
        type: boolean
        name: swing_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: "on"
      - id: 18
        name: temp_set_f
        type: integer
        range:
          min: 55
          max: 90
        hidden: true
        optional: true
      - id: 19
        type: boolean
        name: force
  - entity: select
    category: config
    translation_key: temperature_unit
    dps:
      - id: 10
        type: boolean
        name: option
        mapping:
          - dps_val: true
            value: fahrenheit
          - dps_val: false
            value: celsius
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 15
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 15
        type: bitfield
        name: fault_code
  - entity: switch
    category: config
    translation_key: sleep
    dps:
      - id: 17
        type: boolean
        name: switch
  - entity: select
    category: config
    name: Timer mode
    dps:
      - id: 4
        type: integer
        name: option
        mapping:
          - dps_val: 0
            value: "None"
          - dps_val: 1
            value: "Off timer"
          - dps_val: 2
            value: "On timer"
  - entity: time
    category: config
    name: "On timer"
    translation_key: timer
    dps:
      - id: 14
        type: integer
        name: minute
        range:
          min: 0
          max: 1440
  - entity: time
    category: config
    name: "Off timer"
    translation_key: timer
    dps:
      - id: 13
        type: integer
        name: minute
        range:
          min: 0
          max: 1440
