name: Thermostat
products:
  - id: qgrid1yqzkhmi7ua
    manufacturer: PNI
    model: CT-36 PRO
entities:
  - entity: climate
    translation_key: thermostat
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: heat
            available: heating_set
          - dps_val: true
            value: cool
            available: cooling_set
      - id: 2
        type: string
        name: preset_mode
        mapping:
          - dps_val: manual
            value: manual
          - dps_val: eco
            value: eco
          - dps_val: auto
            value: auto
      - id: 3
        type: string
        name: hvac_action
        mapping:
          - dps_val: heating
            value: heating
            constraint: heating_set
            conditions:
              - dps_val: cold
                value: cooling
          - value: idle
      - id: 24
        type: integer
        name: current_temperature
        range:
          min: 0
          max: 1000
        mapping:
          - scale: 10
            step: 5
      - id: 16
        type: integer
        name: temperature
        unit: C
        range:
          min: 0
          max: 1000
        mapping:
          - scale: 10
            step: 5
      - id: 26
        type: integer
        name: min_temperature
        range:
          min: 0
          max: 1000
        mapping:
          - scale: 10
            step: 5
      - id: 19
        type: integer
        name: max_temperature
        range:
          min: 50
          max: 1000
        mapping:
          - scale: 10
            step: 5
      - id: 101
        type: integer
        optional: true
        name: dead_zone
      - id: 102
        type: string
        name: heating_set
        mapping:
          - dps_val: heat
            value: true
          - value: false
      - id: 102
        type: string
        name: cooling_set
        mapping:
          - dps_val: cold
            value: true
          - value: false
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 10
        type: boolean
        name: switch
  - entity: binary_sensor
    class: window
    category: diagnostic
    dps:
      - id: 3
        type: string
        name: sensor
        mapping:
          - dps_val: window_opened
            value: true
          - value: false
  - entity: switch
    name: Window detection
    category: config
    hidden: unavailable
    dps:
      - id: 8
        type: boolean
        optional: true
        name: switch
      - id: 8
        type: boolean
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
  - entity: number
    translation_key: minimum_temperature
    category: config
    class: temperature
    mode: slider
    dps:
      - id: 26
        name: value
        type: integer
        unit: C
        range:
          min: 0
          max: 1000
        mapping:
          - scale: 10
            step: 5
  - entity: number
    translation_key: maximum_temperature
    category: config
    class: temperature
    mode: slider
    dps:
      - id: 19
        type: integer
        name: value
        unit: C
        range:
          min: 50
          max: 1000
        mapping:
          - scale: 10
            step: 5
  - entity: number
    translation_key: temperature_calibration
    class: temperature_delta
    category: config
    dps:
      - id: 27
        name: value
        type: integer
        unit: C
        range:
          min: -100
          max: 100
        mapping:
          - scale: 10
            step: 5
  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 45
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 45
        type: bitfield
        name: fault_code
  - entity: select
    name: "Control mode"
    translation_key: heat_pump_mode
    category: config
    dps:
      - id: 102
        type: string
        name: option
        mapping:
          - dps_val: heat
            value: heat
          - dps_val: cold
            value: cool
