name: PCT513 themostat
products:
  - id: rsujjtinksnzcezy
    name: Owon PCT513
  - id: sqkxklkleeasfk8w
    name: MoesGo PCT513-WB-TY
primary_entity:
  entity: climate
  translation_only_key: thermostat
  dps:
    - id: 2
      type: string
      name: hvac_mode
      mapping:
        - dps_val: "off"
          value: "off"
        - dps_val: cool
          value: cool
        - dps_val: heat
          value: heat
        - dps_val: auto
          value: heat_cool
        - dps_val: emergencyheat
          value: heat
    - id: 16
      type: integer
      name: temperature
      range:
        min: 41
        max: 4500
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              value_redirect: temp_f
              range:
                min: 41
                max: 90
            - dps_val: c
              range:
                min: 1500
                max: 4500
              scale: 100
              step: 50
    - id: 17
      type: integer
      name: temp_f
      hidden: true
      range:
        min: 41
        max: 90
    - 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: 100
          constraint: temperature_unit
          conditions:
            - dps_val: f
              scale: 1
              value_redirect: curtemp_f
    - id: 29
      type: integer
      name: curtemp_f
      hidden: true
    - id: 34
      type: integer
      name: current_humidity
    - id: 45
      type: bitfield
      name: fault_code
    - id: 107
      type: string
      name: installation
    - id: 108
      type: integer
      name: cool_temp_set
      mapping:
        - scale: 100
    - id: 109
      type: integer
      name: heat_temp_set
    - id: 110
      type: integer
      name: cool_temp_set_f
    - id: 111
      type: integer
      name: heat_temp_set_f
    - id: 115
      type: string
      name: fan_mode
      mapping:
        - dps_val: auto
          value: auto
        - dps_val: "on"
          value: "on"
        - dps_val: cycle
          value: cycle
    - id: 116
      type: string
      name: home_mode
    - id: 118
      type: base64
      name: schedule
      optional: true
    - id: 119
      type: boolean
      name: scheduling
      hidden: true
      mapping:
        - dps_val: false
          value: manual
    - id: 120
      type: string
      name: preset_mode
      mapping:
        - dps_val: followschedule
          constraint: scheduling
          conditions:
            - dps_val: false
              value_redirect: scheduling
              value: manual
            - dps_val: true
              value: program
        - dps_val: temphold
          constraint: scheduling
          conditions:
            - dps_val: false
              value_redirect: scheduling
            - dps_val: true
              value: temp_override
        - dps_val: permhold
          constraint: scheduling
          conditions:
            - dps_val: false
              value_redirect: scheduling
            - dps_val: true
              value: perm_override
    - id: 129
      type: string
      name: hvac_action
      mapping:
        - dps_val: coolfanon
          value: cooling
        - dps_val: alloff
          value: idle
        - dps_val: fanon
          value: fan
        - dps_val: heatfanon
          value: heating
        - dps_val: "1"
          value: preheating
secondary_entities:
  - entity: number
    name: Fan runtime
    category: config
    dps:
      - id: 123
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 55
        mapping:
          - step: 5
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 45
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
