name: Jiahong ET-72W thermostat
primary_entity:
  entity: climate
  dps:
    - id: 101
      type: boolean
      name: hvac_mode
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: "Smart"
              value: auto
            - dps_val: "Manual"
              value: heat
            - dps_val: "Anti_frozen"
              value: cool
    - id: 102
      type: integer
      name: temperature
      range:
        min: 50
        max: 400
      mapping:
        - scale: 10
          step: 5
          constraint: temperature_unit
          conditions:
            - dps_val: true
              step: 30
              range:
                min: 120
                max: 750
    - id: 103
      type: string
      name: mode
      hidden: true
    - id: 105
      type: integer
      name: current_temperature
      mapping:
        - constraint: sensor
          conditions:
            - dps_val: '0'
              scale: 10
            - dps_val: '1'
              value_redirect: floor_temperature
            - dps_val: '2'
              scale: 10
    - id: 106
      type: integer
      name: floor_temperature
      hidden: true
      mapping:
        - scale: 10
    - id: 107
      name: temperature_unit
      type: boolean
      mapping:
        - dps_val: false
          value: C
        - dps_val: true
          value: F
    - id: 111
      type: string
      name: sensor
      hidden: true
    - id: 118
      type: boolean
      name: hvac_action
      mapping:
        - constraint: hvac_mode
          conditions:
            - dps_val: false
              value: "off"
            - dps_val: true
              mapping:
                - dps_val: true
                  value: heating
                - dps_val: false
                  value: idle
    - id: 104
      type: integer
      name: unknown_104
    - id: 109
      type: boolean
      name: unknown_109
    - id: 112
      type: integer
      name: unknown_112
    - id: 113
      type: integer
      name: unknown_113
secondary_entities:
  - entity: lock
    name: Screen lock
    category: config
    dps:
      - id: 108
        type: boolean
        name: lock
        mapping:
          - dps_val: true
            icon: "mdi:hand-back-right-off"
          - dps_val: false
            icon: "mdi:hand-back-right"
  - entity: sensor
    name: Room temperature
    class: temperature
    icon: "mdi:home-thermometer"
    dps:
      - id: 105
        type: integer
        name: sensor
        class: measurement
        mapping:
          - scale: 10
      - id: 107
        name: unit
        type: boolean
        mapping:
          - dps_val: false
            value: C
          - dps_val: true
            value: F
  - entity: sensor
    name: Floor temperature
    class: temperature
    icon: "mdi:thermometer-lines"
    dps:
      - id: 106
        type: integer
        name: sensor
        class: measurement
        mapping:
          - scale: 10
      - id: 107
        name: unit
        type: boolean
        mapping:
          - dps_val: false
            value: C
          - dps_val: true
            value: F
  - entity: sensor
    name: Energy
    dps:
      - id: 117
        type: integer
        name: sensor
        unit: kWh
        mapping:
          - scale: 10
      - id: 116
        type: integer
        name: calibration
  - entity: select
    category: config
    translation_key: temperature_unit
    dps:
      - id: 107
        name: option
        type: boolean
        mapping:
          - dps_val: false
            value: celsius
          - dps_val: true
            value: fahrenheit
  - entity: number
    category: config
    class: temperature
    name: Room temperature limit
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 121
        type: integer
        name: value
        range:
          min: 100
          max: 400
        mapping:
          - scale: 10
            step: 5
            constraint: unit
            conditions:
              - dps_val: true
                step: 30
                range:
                  min: 120
                  max: 750
      - id: 107
        name: unit
        type: boolean
        mapping:
          - dps_val: false
            value: C
          - dps_val: true
            value: F
  - entity: select
    category: config
    name: Temperature sensor
    icon: "mdi:thermometer-check"
    dps:
      - id: 111
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: "Room"
            icon: "mdi:home-thermometer"
          - dps_val: "1"
            value: "Floor"
            icon: "mdi:heating-coil"
          - dps_val: '2'
            value: "Both"
            icon: "mdi:thermometer"
  - entity: select
    category: config
    name: Auto schedule
    icon: "mdi:calendar-sync"
    dps:
      - id: 110
        type: integer
        name: option
        mapping:
          - dps_val: 0
            value: "7"
          - dps_val: 1
            value: "5+1+1"
          - dps_val: 2
            value: "7 (Adaptive)"
          - dps_val: 3
            value: "5+1+1 (Adaptive)"
