name: Thermostat
legacy_type: inkbird_thermostat
products:
  - id: wynvjn0ztufzrd0p
    manufacturer: Inkbird
    model: ITC-306A V3.0
  - id: ziqtatr15jcbblem
    manufacturer: Inkbird
    model: ITC-306A V4
entities:
  - entity: climate
    translation_only_key: thermo_switch
    dps:
      - id: 101
        type: string
        name: temperature_unit
      - id: 103
        type: string
        name: hvac_mode
        mapping:
          - dps_val: "on"
            value: heat
          - dps_val: pause
            value: fan_only
          - dps_val: "off"
            value: "off"
            icon: "mdi:thermometer-off"
            icon_priority: 4
      - id: 104
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: F
                value_redirect: current_temperature_f
      - id: 106
        type: integer
        name: target_temp_low
        range:
          min: 0
          max: 450
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: F
                range:
                  min: 320
                  max: 1130
      - id: 111
        type: boolean
        name: high_temp_alarm
        hidden: true
        mapping:
          - dps_val: true
            icon: "mdi:thermometer-alert"
            icon_priority: 1
      - id: 112
        type: boolean
        name: low_temp_alarm
        hidden: true
        mapping:
          - dps_val: true
            icon: "mdi:snowflake-alert"
            icon_priority: 2
      - id: 113
        type: boolean
        name: temperature_difference_alarm
        hidden: true
        mapping:
          - dps_val: true
            icon: "mdi:thermometer-alert"
            icon_priority: 3
      - id: 114
        type: integer
        name: target_temp_high
        range:
          min: 0
          max: 450
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: F
                range:
                  min: 320
                  max: 1130
      - id: 115
        type: boolean
        name: hvac_action
        mapping:
          - dps_val: true
            icon: "mdi:thermometer"
            icon_priority: 6
            value: heating
          - dps_val: false
            icon: "mdi:thermometer-off"
            icon_priority: 5
            value: idle
      - id: 116
        type: integer
        name: current_temperature_f
        mapping:
          - scale: 10
        hidden: true
      - id: 120
        type: boolean
        name: heat_time_alarm
        hidden: true
        mapping:
          - dps_val: true
            icon: "mdi:clock-alert"
            icon_priority: 4
  - entity: number
    category: config
    translation_key: temperature_calibration
    class: temperature_delta
    dps:
      - id: 102
        name: value
        type: integer
        range:
          min: -99
          max: 99
        mapping:
          - scale: 10
            constraint: unit
            conditions:
              - dps_val: F
                range:
                  min: -150
                  max: 150
      - id: 101
        type: string
        name: unit
  - entity: number
    name: Continuous heat hours
    icon: "mdi:clock"
    category: config
    dps:
      - id: 108
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 96
  - entity: number
    translation_key: maximum_temperature
    category: config
    class: temperature
    dps:
      - id: 109
        name: value
        type: integer
        range:
          min: -400
          max: 1000
        mapping:
          - scale: 10
            constraint: unit
            conditions:
              - dps_val: F
                range:
                  min: -400
                  max: 2120
      - id: 101
        name: unit
        type: string
        hidden: true
  - entity: number
    translation_key: minimum_temperature
    category: config
    class: temperature
    dps:
      - id: 110
        name: value
        type: integer
        range:
          min: -400
          max: 1000
        mapping:
          - scale: 10
            constraint: unit
            conditions:
              - dps_val: F
                range:
                  min: -400
                  max: 2120
      - id: 101
        name: unit
        type: string
        hidden: true
  - entity: select
    category: config
    translation_key: temperature_unit
    dps:
      - id: 101
        name: option
        type: string
        mapping:
          - dps_val: C
            value: celsius
          - dps_val: F
            value: fahrenheit
  - entity: binary_sensor
    class: heat
    category: diagnostic
    name: High temperature
    dps:
      - id: 111
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: cold
    category: diagnostic
    name: Low temperature
    dps:
      - id: 112
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    name: Continuous heat
    dps:
      - id: 120
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 12
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 12
        type: bitfield
        name: fault_code
  - entity: binary_sensor
    class: problem
    category: diagnostic
    name: Unbalanced
    icon: "mdi:scale-unbalanced"
    dps:
      - id: 113
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    name: Probe 1 fault
    dps:
      - id: 117
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    name: Probe 2 fault
    dps:
      - id: 118
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    name: Heating fault
    dps:
      - id: 119
        type: boolean
        name: sensor
