name: Thermostat
products:
  - id: g9a3awaj
    manufacturer: RTI-Tek
    model: T5Z
entities:
  - entity: climate
    translation_only_key: thermostat
    dps:
      - id: 1
        name: hvac_mode
        type: boolean
        mapping:
          - dps_val: true
            constraint: mode
            conditions:
              - dps_val: auto
                value: auto
              - dps_val: manual
                value: heat
          - dps_val: false
            value: "off"
      - id: 2
        name: mode
        type: string
        hidden: true
      - id: 16
        type: integer
        name: temperature
        unit: C
        range:
          min: 50
          max: 950
        mapping:
          - scale: 10
            step: 5
      - id: 18
        type: integer
        optional: true
        name: min_temperature
        mapping:
          - scale: 10
      - id: 19
        type: integer
        optional: true
        name: max_temperature
        mapping:
          - scale: 10
      - id: 24
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
      - id: 36
        type: string
        name: hvac_action
        optional: true
        mapping:
          - dps_val: close
            value: idle
          - dps_val: open
            value: heating
  - entity: sensor
    class: battery
    dps:
      - id: 9
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: number
    translation_key: temperature_calibration
    class: temperature_delta
    category: config
    dps:
      - id: 109
        type: integer
        optional: true
        name: value
        unit: C
        range:
          min: -99
          max: 99
        mapping:
          - scale: 10
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 10
        type: boolean
        optional: true
        name: switch
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        optional: true
        type: boolean
        name: lock
  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 45
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 45
        name: fault_code
        optional: true
        type: bitfield
      - id: 105
        name: product_info
        optional: true
        type: string
  - entity: number
    translation_key: maximum_temperature
    category: config
    class: temperature
    dps:
      - id: 19
        type: integer
        name: value
        unit: C
        optional: true
        range:
          min: 210
          max: 950
        mapping:
          - scale: 10
            step: 10
  - entity: number
    translation_key: minimum_temperature
    category: config
    class: temperature
    dps:
      - id: 18
        optional: true
        name: value
        type: integer
        unit: C
        range:
          min: 50
          max: 200
        mapping:
          - scale: 10
            step: 10
  - entity: select
    name: Working week
    icon: "mdi:calendar-clock"
    category: config
    dps:
      - id: 31
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "5_2"
            value: "5 days"
          - dps_val: "6_1"
            value: "6 days"
          - dps_val: "7"
            value: "7 days"
  - entity: text
    translation_key: schedule
    category: config
    hidden: true
    dps:
      - id: 67
        type: base64
        optional: true
        name: value
