name: Thermostat
entities:
  - entity: climate
    translation_only_key: thermostat
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            constraint: preset_mode
            conditions:
              - dps_val: cold
                value: heat
              - dps_val: hot
                value: auto
              - dps_val: wind
                value: auto
      - id: 2
        type: integer
        name: temperature
        unit: C
        mapping:
          - scale: 10
            step: 5
        range:
          min: 50
          max: 950
      - id: 3
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
      - id: 4
        type: string
        name: preset_mode
        mapping:
          - dps_val: cold
            value: manual
          - dps_val: hot
            value: program
          - dps_val: wind
            value: temp_override
            hidden: true
      - id: 5
        type: string
        name: hvac_action
        mapping:
          - dps_val: "0"
            value: idle
          - dps_val: "1"
            value: heating
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 8
        type: boolean
        name: lock
  - entity: switch
    name: Sound
    category: config
    icon: "mdi:music-note"
    dps:
      - id: 13
        type: boolean
        name: switch
  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 16
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 16
        type: bitfield
        name: fault_code
  - entity: number
    name: Calibration offset
    category: config
    icon: "mdi:arrow-collapse-up"
    dps:
      - id: 20
        type: integer
        name: value
        unit: C
        range:
          min: -90
          max: 90
        mapping:
          - scale: 10
  - entity: number
    name: High temperature limit
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 21
        type: integer
        name: value
        unit: C
        range:
          min: 15
          max: 95
  - entity: select
    name: Sensor selection
    category: config
    icon: "mdi:home-thermometer"
    dps:
      - id: 25
        type: string
        name: option
        mapping:
          - dps_val: "1"
            value: Internal
          - dps_val: "2"
            value: External
          - dps_val: "3"
            value: Both
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 26
        type: boolean
        name: switch
  - entity: select
    name: Backlight brightness
    category: config
    dps:
      - id: 41
        type: string
        name: option
        mapping:
          - dps_val: "0"
            icon: "mdi:lightbulb-on-10"
            value: None
          - dps_val: "1"
            icon: "mdi:lightbulb-on-40"
            value: Low
          - dps_val: "2"
            icon: "mdi:lightbulb-on-70"
            value: Middle
          - dps_val: "3"
            icon: "mdi:lightbulb-on"
            value: High
  - entity: select
    name: Schedule
    category: config
    icon: "mdi:calendar-clock"
    dps:
      - id: 42
        type: string
        name: option
        mapping:
          - dps_val: "1"
            value: "Weekday+Weekend"
          - dps_val: "2"
            value: "Mon-Sat+Sun"
          - dps_val: "3"
            value: "Daily"
  - entity: switch
    name: Output main reverse
    category: config
    icon: "mdi:swap-horizontal"
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: number
    name: Temperature control switch difference
    category: config
    icon: "mdi:thermometer-plus"
    dps:
      - id: 105
        type: integer
        name: value
        unit: C
        range:
          min: 5
          max: 95
        mapping:
          - scale: 10
  - entity: number
    name: External sensor temperature limit
    category: config
    class: temperature
    icon: "mdi:arrow-collapse-up"
    dps:
      - id: 107
        type: integer
        name: value
        unit: C
        range:
          min: 5
          max: 60
