name: Inkbird ITC-306A thermostat
legacy_type: inkbird_thermostat
products:
  - id: wynvjn0ztufzrd0p
    name: Inkbird ITC-306A V3.0
primary_entity:
  entity: climate
  translation_only_key: thermo_switch
  dps:
    - id: 12
      type: bitfield
      name: error
      mapping:
        - dps_val: 0
          value: OK
    - 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"
    - 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:
        - icon: "mdi:thermometer-off"
          icon_priority: 5
          value: "off"
          constraint: hvac_mode
          conditions:
            - dps_val: "on"
              mapping:
                - dps_val: true
                  icon: "mdi:thermometer"
                  icon_priority: 6
                  value: heating
                - dps_val: false
                  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
secondary_entities:
  - entity: number
    category: config
    name: Calibration offset
    icon: "mdi:arrow-collapse-up"
    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
  - 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
    name: High temperature limit
    category: config
    class: temperature
    icon: "mdi:thermometer-alert"
    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
    name: Low temperature limit
    icon: "mdi:snowflake-alert"
    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
  - 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
