name: Air conditioner
products:
  - id: wl0rysa7fts3j8ll
    manufacturer: TruCool
    model: TC1160
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: auto
                value: heat_cool
              - dps_val: cold
                value: cool
              - dps_val: wind
                value: fan_only
              - dps_val: wet
                value: dry
              - dps_val: hot
                value: heat
      - id: 2
        name: temperature
        type: integer
        unit: C
        range:
          min: 15
          max: 31
        mapping:
          - constraint: temperature_unit
            conditions:
              - dps_val: F
                value_redirect: temperature_f
                range:
                  min: 59
                  max: 88
      - id: 3
        name: current_temperature
        type: integer
      - id: 4
        name: mode
        type: string
        hidden: true
      - id: 5
        name: fan_mode
        type: string
        mapping:
          - dps_val: "1"
            value: low
          - dps_val: "2"
            value: medium
          - dps_val: "3"
            value: high
      - id: 19
        type: string
        name: temperature_unit
        hidden: true
      - id: 101
        type: boolean
        name: preset_mode
        mapping:
          - dps_val: true
            value: sleep
          - dps_val: false
            value: none
      - id: 104
        name: swing_mode
        type: boolean
        mapping:
          - dps_val: true
            value: "on"
          - dps_val: false
            value: "off"
      - id: 108
        type: integer
        name: temperature_f
        hidden: true
  - 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: binary_sensor
    translation_key: defrost
    category: diagnostic
    dps:
      - id: 102
        type: boolean
        name: sensor
  - entity: number
    class: duration
    translation_key: timer
    dps:
      - id: 103
        name: value
        type: integer
        unit: h
        range:
          min: 0
          max: 24
  - entity: sensor
    translation_key: time_remaining
    category: diagnostic
    class: duration
    dps:
      - id: 105
        name: sensor
        type: integer
        unit: min
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 106
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 106
        type: bitfield
        name: fault_code
