name: Thermostat
products:
  - id: gogb05wrtredz3bs
    name: Avatto ME81
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
      unit: C
      range:
        min: 5
        max: 90
    - id: 19
      type: integer
      name: max_temperature
      optional: true
    - id: 26
      type: integer
      name: min_temperature
      optional: true
    - id: 24
      type: integer
      name: current_temperature
      mapping:
        - scale: 10
    - id: 36
      type: string
      name: hvac_action
      mapping:
        - constraint: hvac_mode
          conditions:
            - dps_val: false
              value: "off"
            - dps_val: true
              mapping:
                - dps_val: open
                  value: heating
                - dps_val: close
                  value: idle
    - id: 38
      type: string
      optional: true
      name: week_program
secondary_entities:
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 10
        type: boolean
        name: switch
        optional: true
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - 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: 30
          max: 90
  - 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: 5
          max: 20
  - entity: number
    name: Temperature calibration
    category: config
    icon: "mdi:thermometer-check"
    dps:
      - id: 27
        type: integer
        optional: true
        name: value
        unit: °
        range:
          min: -9
          max: 9
  - entity: button
    translation_key: factory_reset
    category: config
    dps:
      - id: 39
        type: boolean
        name: button
        optional: true
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
        optional: true
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - entity: select
    name: Temperature sensor
    icon: "mdi:home-thermometer"
    category: config
    dps:
      - id: 43
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: in
            value: Internal
          - dps_val: out
            value: External
          - dps_val: all
            value: Both
          - dps_val: null
            value: Internal
            hidden: true
  - entity: binary_sensor
    class: problem
    category: diagnostic
    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: Temperature hysteresis
    category: config
    icon: "mdi:thermometer-plus"
    dps:
      - id: 101
        type: integer
        optional: true
        name: value
        unit: °
        range:
          min: 1
          max: 5
  - entity: select
    name: Program type
    icon: "mdi:calendar-week"
    category: config
    dps:
      - id: 102
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "00"
            value: Disabled
          - dps_val: "52"
            value: Weekdays+Weekend
          - dps_val: "61"
            value: Six working days
          - dps_val: "70"
            value: Daily
