name: Thermostat
# products:
#   - id: UNKNOWN
#     manufacturer: Mi-Heat
#     model: TH11-WF
entities:
  - entity: climate
    translation_key: thermostat
    dps:
      - id: 1
        name: hvac_mode
        type: boolean
        mapping:
          - dps_val: false
            value: "off"
            hidden: true
          - dps_val: true
            constraint: mode
            conditions:
              - dps_val: cool
                value: cool
              - dps_val: heat
                value: heat
      - id: 2
        name: temperature
        type: integer
        range:
          min: 50
          max: 350
        unit: C
        mapping:
          - scale: 10
            step: 5
      - id: 3
        name: current_temperature
        type: integer
        mapping:
          - scale: 10
      - id: 4
        name: mode
        type: string
        hidden: true
      - id: 113
        type: boolean
        name: preset_mode
        mapping:
          - dps_val: true
            value: away
          - dps_val: false
            constraint: p_mode
            conditions:
              - dps_val: manual
                value: manual
              - dps_val: program
                value: program
      - id: 111
        type: string
        name: p_mode
        hidden: true
  - entity: sensor
    class: humidity
    dps:
      - id: 121
        name: sensor
        type: integer
        unit: "%"
        class: measurement
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 9
        name: lock
        type: boolean
  - entity: sensor
    class: power
    dps:
      - id: 10
        name: sensor
        type: integer
        unit: W
        class: measurement
        mapping:
          - scale: 10
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 11
        type: bitfield
        name: fault_code
  - entity: sensor
    class: energy
    dps:
      - id: 110
        name: sensor
        type: integer
        precision: 0
        unit: kWh
        class: total_increasing
  - entity: binary_sensor
    class: window
    dps:
      - id: 112
        type: string
        name: sensor
        mapping:
          - dps_val: open
            value: true
          - value: false
  - entity: switch
    name: Eco
    icon: "mdi:leaf"
    category: config
    dps:
      - id: 8
        type: boolean
        name: switch
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 123
        type: boolean
        name: switch
  - entity: select
    name: Boost
    translation_key: timer
    icon: "mdi:rocket-launch"
    dps:
      - id: 120
        type: string
        name: option
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: "5min"
            value: "5m"
          - dps_val: "10min"
            value: "10m"
          - dps_val: "15min"
            value: "15m"
          - dps_val: "20min"
            value: "20m"
          - dps_val: "25min"
            value: "25m"
          - dps_val: "30min"
            value: "30m"
          - dps_val: "35min"
            value: "35m"
          - dps_val: "40min"
            value: "40m"
          - dps_val: "45min"
            value: "45m"
          - dps_val: "50min"
            value: "50m"
          - dps_val: "55min"
            value: "55m"
          - dps_val: "60min"
            value: "1h"
          - dps_val: "65min"
            value: "1h5m"
          - dps_val: "70min"
            value: "1h10m"
          - dps_val: "75min"
            value: "1h15m"
          - dps_val: "80min"
            value: "1h20m"
          - dps_val: "85min"
            value: "1h25m"
          - dps_val: "90min"
            value: "1h30m"
          - dps_val: "95min"
            value: "1h35m"
          - dps_val: "100min"
            value: "1h40m"
          - dps_val: "105min"
            value: "1h45m"
          - dps_val: "110min"
            value: "1h50m"
          - dps_val: "115min"
            value: "1h55m"
          - dps_val: "120min"
            value: "2h"
