name: Dual thermostat
products:
  - id: kgimsje9a1qhqs2w
    name: Inkbird IPT-2CH V2.0 reptile thermostat
primary_entity:
  entity: climate
  name: Probe 1
  translation_key: thermostat
  dps:
    - id: 101
      type: string
      optional: true
      name: temperature_unit
      mapping:
        - dps_val: null
          value: C
    - id: 102
      type: integer
      optional: true
      name: target_temp_low
      range:
        min: 0
        max: 1130
      mapping:
        - scale: 10
          constraint: temperature_unit
          conditions:
            - dps_val: C
              range:
                min: 0
                max: 450
            - dps_val: F
              range:
                min: 320
                max: 1130
    - id: 103
      type: integer
      optional: true
      name: target_temp_high
      range:
        min: 0
        max: 1130
      mapping:
        - scale: 10
          constraint: temperature_unit
          conditions:
            - dps_val: C
              range:
                min: 0
                max: 450
            - dps_val: F
              range:
                min: 320
                max: 1130
    - id: 104
      type: integer
      name: current_temperature
      mapping:
        - scale: 10
          constraint: temperature_unit
          conditions:
            - dps_val: F
              value_redirect: current_temp_f
    - id: 119
      type: integer
      optional: true
      name: current_temp_f
      mapping:
        - scale: 10
    - id: 120
      type: string
      optional: true
      name: hvac_action
      mapping:
        - dps_val: "0"
          value: idle
        - dps_val: "1"
          value: heating
        - dps_val: "2"
          value: idle
        - dps_val: "3"
          value: heating
secondary_entities:
  - entity: climate
    name: Probe 2
    translation_key: thermostat
    dps:
      - id: 101
        type: string
        optional: true
        name: temperature_unit
        mapping:
          - dps_val: null
            value: C
      - id: 108
        type: integer
        optional: true
        name: target_temp_low
        range:
          min: 0
          max: 1130
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: C
                range:
                  min: 0
                  max: 450
              - dps_val: F
                range:
                  min: 320
                  max: 1130
      - id: 109
        type: integer
        optional: true
        name: target_temp_high
        range:
          min: 0
          max: 1130
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: C
                range:
                  min: 0
                  max: 450
              - dps_val: F
                range:
                  min: 320
                  max: 1130
      - id: 124
        type: integer
        optional: true
        name: current_temperature
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: F
                value_redirect: current_temp_f
      - id: 125
        type: integer
        optional: true
        name: current_temp_f
        mapping:
          - scale: 10
      - id: 120
        type: string
        optional: true
        name: hvac_action
        mapping:
          - dps_val: "0"
            value: idle
          - dps_val: "1"
            value: idle
          - dps_val: "2"
            value: heating
          - dps_val: "3"
            value: heating
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 12
        type: bitfield
        optional: true
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 12
        type: bitfield
        optional: true
        name: fault_code
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 101
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: C
            value: celsius
          - dps_val: F
            value: fahrenheit
  - entity: number
    name: High Temperature Alarm 1
    class: temperature
    category: config
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 105
        type: integer
        optional: true
        name: value
        range:
          min: -50
          max: 1220
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: C
                range:
                  min: -50
                  max: 500
              - dps_val: F
                range:
                  min: 230
                  max: 1220
      - id: 101
        type: string
        optional: true
        name: unit
        mapping:
          - dps_val: null
            value: C
  - entity: number
    name: Low Temperature Alarm 1
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 106
        type: integer
        optional: true
        name: value
        range:
          min: -50
          max: 1220
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: C
                range:
                  min: -50
                  max: 500
              - dps_val: F
                range:
                  min: 230
                  max: 1220
      - id: 101
        type: string
        optional: true
        name: unit
        mapping:
          - dps_val: null
            value: C
  - entity: number
    name: Temperature calibration 1
    category: config
    icon: "mdi:thermometer-check"
    dps:
      - id: 107
        type: integer
        optional: true
        name: value
        unit: "°"
        range:
          min: -99
          max: 99
        mapping:
          - scale: 10
  - entity: number
    name: High Temperature Alarm 2
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 110
        type: integer
        optional: true
        name: value
        range:
          min: -50
          max: 1220
        mapping:
          - scale: 10
      - id: 101
        type: string
        optional: true
        name: unit
        mapping:
          - dps_val: null
            value: C
  - entity: number
    name: Low Temperature Alarm 2
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 111
        type: integer
        optional: true
        name: value
        range:
          min: -50
          max: 1220
        mapping:
          - scale: 10
      - id: 101
        type: string
        optional: true
        name: unit
        mapping:
          - dps_val: null
            value: C
  - entity: number
    name: Temperature calibration 2
    category: config
    icon: "mdi:thermometer-check"
    dps:
      - id: 112
        type: integer
        optional: true
        name: value
        unit: "°"
        range:
          min: -99
          max: 99
        mapping:
          - scale: 10
  - entity: sensor
    name: Probe 1 status
    class: enum
    category: diagnostic
    dps:
      - id: 113
        type: string
        optional: true
        name: sensor
        mapping:
          - dps_val: null
            value: Unknown
          - dps_val: "0"
            value: Not connected
          - dps_val: "1"
            value: Normal
          - dps_val: "2"
            value: Error
  - entity: sensor
    name: Probe 2 status
    class: enum
    category: diagnostic
    dps:
      - id: 114
        type: string
        optional: true
        name: sensor
        mapping:
          - dps_val: null
            value: Unknown
          - dps_val: "0"
            value: Not connected
          - dps_val: "1"
            value: Normal
          - dps_val: "2"
            value: Error
  - entity: binary_sensor
    name: High temperature alarm 1
    class: heat
    category: diagnostic
    dps:
      - id: 115
        type: boolean
        optional: true
        name: sensor
  - entity: binary_sensor
    name: Low temperature alarm 1
    class: cold
    category: diagnostic
    dps:
      - id: 116
        type: boolean
        optional: true
        name: sensor
  - entity: binary_sensor
    name: High temperature alarm 2
    class: heat
    category: diagnostic
    dps:
      - id: 117
        type: boolean
        optional: true
        name: sensor
  - entity: binary_sensor
    name: Low temperature alarm 2
    class: cold
    category: diagnostic
    dps:
      - id: 118
        type: boolean
        optional: true
        name: sensor
  - entity: switch
    name: Alarm
    icon: "mdi:alarm-bell"
    category: config
    dps:
      - id: 122
        type: boolean
        optional: true
        name: switch
  - entity: binary_sensor
    name: Alarm
    class: sound
    category: diagnostic
    dps:
      - id: 123
        type: boolean
        optional: true
        name: sensor
  - entity: button
    name: Alarm mute
    icon: "mdi:volume-mute"
    category: config
    dps:
      - id: 123
        type: boolean
        optional: true
        name: button
        mapping:
          - dps_val: false
            value: true
