name: Heater
# products: Goldair GPPH
legacy_type: heater
entities:
  - entity: climate
    translation_only_key: swing_as_powerlevel
    dps:
      - id: 1
        type: boolean
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: "heat"
        name: hvac_mode
      - id: 2
        type: integer
        range:
          min: 5
          max: 35
        mapping:
          - constraint: preset_mode
            conditions:
              - dps_val: "ECO"
                value_redirect: eco_temperature
                range:
                  min: 5
                  max: 21
              - dps_val: "AF"
                invalid: true
                value: 5
                range:
                  min: 5
                  max: 5
        name: temperature
        unit: C
      - id: 3
        type: integer
        name: current_temperature
      - id: 4
        type: string
        mapping:
          - dps_val: C
            value: comfort
          - dps_val: ECO
            value: eco
          - dps_val: AF
            value: away
        name: preset_mode
      - id: 101
        type: string
        name: hvac_action
        mapping:
          - dps_val: stop
            value: idle
          - value: heating
      - id: 101
        type: string
        mapping:
          - dps_val: "stop"
            constraint: swing_mode
            conditions:
              - dps_val: stop
                value: Stop
          - dps_val: "1"
            value: "1"
          - dps_val: "2"
            value: "2"
          - dps_val: "3"
            value: "3"
          - dps_val: "4"
            value: "4"
          - dps_val: "5"
            value: "5"
        name: power_level
      - id: 103
        type: boolean
        name: timer_mode
      - id: 105
        type: string
        mapping:
          - dps_val: "stop"
            constraint: power_level
            conditions:
              - dps_val: stop
                value: stop
            value: stop
          - dps_val: auto
            value: auto
          - dps_val: user
            constraint: power_level
            conditions:
              - dps_val: "1"
                value: "1"
              - dps_val: "2"
                value: "2"
              - dps_val: "3"
                value: "3"
              - dps_val: "4"
                value: "4"
              - dps_val: "5"
                value: "5"
              - dps_val: stop
                value: stop
        name: swing_mode
      - id: 106
        type: integer
        range:
          min: 5
          max: 21
        mapping:
          - constraint: preset_mode
            conditions:
              - dps_val: "C"
                invalid: true
              - dps_val: "AF"
                invalid: true
        hidden: true
        name: eco_temperature
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 6
        type: boolean
        name: lock
  - entity: time
    translation_key: timer
    category: config
    dps:
      - id: 102
        type: integer
        name: minute
        range:
          min: 0
          max: 1440
  - entity: number
    translation_key: timer
    # 2025-07-20
    deprecated: time.timer
    class: duration
    category: config
    dps:
      - id: 102
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 1440
        mapping:
          - step: 60
  - entity: sensor
    name: Power level
    class: power_factor
    icon: "mdi:signal"
    category: diagnostic
    dps:
      - id: 101
        type: string
        name: sensor
        unit: "%"
        mapping:
          - dps_val: "stop"
            value: 0
          - dps_val: "auto"
            value: 0
          - dps_val: "1"
            value: 20
          - dps_val: "2"
            value: 40
          - dps_val: "3"
            value: 60
          - dps_val: "4"
            value: 80
          - dps_val: "5"
            value: 100
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 12
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 12
        type: bitfield
        name: fault_code
