name: Thermostat
# rebadged as RT-70
entities:
  - entity: climate
    translation_key: thermostat
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            constraint: mode
            conditions:
              - dps_val: manual
                value: heat
              - dps_val: auto
                value: auto
      - id: 2
        type: integer
        name: temperature
        range:
          min: 50
          max: 990
        mapping:
          - scale: 10
            step: 5
        unit: C
      - id: 3
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
      - id: 4
        type: string
        name: mode
        hidden: true
      - id: 21
        type: integer
        name: max_temperature
      - id: 22
        type: integer
        name: min_temperature
      - id: 35
        type: string
        name: hvac_action
        mapping:
          - dps_val: open
            value: heating
          - dps_val: close
            value: idle
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 8
        type: boolean
        name: lock
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 16
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 16
        type: bitfield
        name: fault_code
  - entity: number
    translation_key: temperature_calibration
    class: temperature_delta
    category: config
    dps:
      - id: 20
        type: integer
        name: value
        unit: C
        range:
          min: -95
          max: 95
        mapping:
          - scale: 10
            step: 5
  - entity: number
    translation_key: maximum_temperature
    category: config
    class: temperature
    dps:
      - id: 21
        type: integer
        name: value
        unit: C
        range:
          min: 5
          max: 99
  - entity: number
    translation_key: minimum_temperature
    category: config
    class: temperature
    dps:
      - id: 22
        type: integer
        name: value
        unit: C
        range:
          min: 5
          max: 99
  - entity: select
    name: Temperature probe
    icon: "mdi:thermometer"
    category: config
    dps:
      - id: 25
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: Air
          - dps_val: "1"
            value: Floor
          - dps_val: "2"
            value: Both
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 26
        type: boolean
        name: switch
  - entity: button
    translation_key: factory_reset
    category: config
    hidden: true
    dps:
      - id: 31
        type: boolean
        name: button
  - entity: select
    name: Schedule
    icon: "mdi:calendar"
    category: config
    dps:
      - id: 42
        type: string
        name: option
        mapping:
          - dps_val: "1"
            value: "Weekdays+Weekend"
          - dps_val: "2"
            value: "Mon-Sat+Sun"
          - dps_val: "3"
            value: "Daily"
      - id: 43
        type: string
        optional: true
        name: program
  - entity: number
    name: Floor temperature
    category: config
    icon: "mdi:thermometer"
    dps:
      - id: 101
        type: integer
        name: value
        unit: C
        range:
          min: 5
          max: 99
  - entity: sensor
    name: Floor temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10
  - entity: number
    name: Room temperature hysteresis
    class: temperature_delta
    category: config
    icon: "mdi:thermometer-lines"
    dps:
      - id: 103
        type: integer
        name: value
        unit: C
        range:
          min: 5
          max: 30
        mapping:
          - scale: 10
            step: 5
  - entity: number
    name: Floor temperature hysteresis
    category: config
    class: temperature_delta
    icon: "mdi:thermometer-lines"
    dps:
      - id: 104
        type: integer
        name: value
        unit: C
        range:
          min: 1
          max: 9
  - entity: select
    translation_key: initial_state
    category: config
    dps:
      - id: 105
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: "off"
          - dps_val: "1"
            value: memory
