name: Thermostat
products:
  - id: 14bmxdarlb4ravgd
    name: Moes WHT-009
primary_entity:
  entity: climate
  translation_key: thermostat
  dps:
    - id: 1
      name: hvac_mode
      type: boolean
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: manual
              value: heat
            - dps_val: auto
              value: auto
    - id: 2
      name: mode
      type: string
    - id: 16
      name: temperature
      type: integer
      unit: C
      range:
        min: 50
        max: 450
      mapping:
        - scale: 10
          step: 5
    - id: 24
      name: current_temperature
      type: integer
      mapping:
        - scale: 10
          step: 5
    - id: 19
      type: integer
      name: max_temperature
      mapping:
        - scale: 10
    - id: 26
      type: integer
      name: min_temperature
      mapping:
        - scale: 10
    - id: 36
      type: string
      name: hvac_action
      mapping:
        - dps_val: open
          value: heating
        - dps_val: close
          value: idle
    - id: 71
      type: string
      optional: true
      name: week_program

secondary_entities:
  - entity: number
    name: Maximum temperature
    class: temperature
    category: config
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 19
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: 150
          max: 450
        mapping:
          - scale: 10
            step: 10
  - entity: number
    name: Minimum temperature
    class: temperature
    category: config
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 26
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: 50
          max: 150
        mapping:
          - scale: 10
            step: 10
  - entity: number
    name: Temperature correction
    category: config
    icon: "mdi:thermometer-check"
    dps:
      - id: 27
        type: integer
        optional: true
        name: value
        range:
          min: -9
          max: 9
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
  - entity: sensor
    name: External temperature
    class: temperature
    dps:
      - id: 101
        type: integer
        name: sensor
        class: measurement
        unit: C
        mapping:
          - scale: 10
            step: 5
  - entity: select
    name: Temperature sensor type
    icon: "mdi:home-thermometer"
    category: config
    dps:
      - id: 102
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: IN
            value: Internal
          - dps_val: OU
            value: External
          - dps_val: AL
            value: Both
  - entity: number
    name: Temperature hysteresis
    category: config
    icon: "mdi:thermometer-plus"
    dps:
      - id: 103
        type: integer
        optional: true
        name: value
        unit: °
        range:
          min: 1
          max: 5
  - entity: number
    name: Overheat limit
    class: temperature
    category: config
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 104
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: 100
          max: 700
        mapping:
          - scale: 10
            step: 10
  - entity: number
    name: Frost protection temperature
    class: temperature
    category: config
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 105
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: 0
          max: 100
        mapping:
          - scale: 10
            step: 10
  - entity: number
    name: Eco temperature
    class: temperature
    category: config
    icon: "mdi:leaf"
    dps:
      - id: 106
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: 0
          max: 300
        mapping:
          - scale: 10
            step: 10
