name: Beok TR9B thermostat
primary_entity:
  entity: climate
  dps:
    - id: 1
      type: boolean
      name: hvac_mode
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: auto
              value: auto
            - dps_val: manual
              value: heat
    - id: 2
      type: string
      name: mode
      hidden: true
    - id: 16
      type: integer
      name: temperature
      range:
        min: 50
        max: 10000
      mapping:
        - scale: 10
          step: 5
          constraint: temperature_unit
          conditions:
            - dps_val: f
              step: 10
    - id: 19
      type: integer
      name: max_temperature
      mapping:
        - scale: 10
    - id: 23
      type: string
      name: temperature_unit
      mapping:
        - dps_val: c
          value: C
        - dps_val: f
          value: F
    - id: 24
      type: integer
      name: current_temperature
      mapping:
        - scale: 10
    - id: 26
      type: integer
      name: min_temperature
      mapping:
        - scale: 10
    - id: 101
      type: integer
      name: unknown_101
    - id: 102
      type: integer
      name: unknown_102
secondary_entities:
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 10
        type: boolean
        name: switch
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 23
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: select
    name: Schedule
    category: config
    icon: "mdi:calendar-clock"
    dps:
      - id: 31
        type: string
        name: option
        mapping:
          - dps_val: "5_2"
            value: "Weekday+Weekend"
          - dps_val: "6_1"
            value: "Mon-Sat+Sun"
          - dps_val: "7"
            value: "Daily"
  - entity: binary_sensor
    name: Valve
    class: opening
    category: diagnostic
    dps:
      - id: 36
        type: string
        name: sensor
        mapping:
          - dps_val: open
            value: true
          - dps_val: close
            value: false
  - entity: lock
    translation_key: "child_lock"
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 45
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 45
        type: bitfield
        name: fault_code
  - entity: number
    name: High temperature limit
    category: config
    class: temperature
    dps:
      - id: 19
        type: integer
        name: value
        unit: C
        range:
          min: 50
          max: 10000
        mapping:
          - scale: 10
            step: 10
  - entity: number
    name: Low temperature limit
    category: config
    class: temperature
    dps:
      - id: 26
        name: value
        type: integer
        unit: C
        range:
          min: 50
          max: 10000
        mapping:
          - scale: 10
            step: 10
