name: Spa Heat Pump
products:
  - id: pzp8owd7lhtpssgj
    name: Poolex Arctic Action
primary_entity:
  entity: climate
  icon: "mdi:hot-tub"
  translation_only_key: pool_heatpump
  dps:
    - id: 1
      type: boolean
      name: hvac_mode
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          value: "auto"
    - id: 2
      type: integer
      name: temperature
      range:
        min: 5
        max: 40
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              range:
                min: 41
                max: 104
              value_redirect: temp_set_f
    - id: 3
      type: integer
      name: current_temperature
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              value_redirect: temp_current_f
    - id: 4
      type: string
      name: preset_mode
      mapping:
        - dps_val: heat
          icon: "mdi:hot-tub"
          value: smart_heat
        - dps_val: h_powerful
          icon: "mdi:hot-tub"
          value: quick_heat
        - dps_val: h_silent
          icon: "mdi:hot-tub"
          value: quiet_heat
        - dps_val: cool
          icon: "mdi:snowflake"
          value: smart_cool
        - dps_val: c_powerful
          icon: "mdi:snowflake"
          value: quick_cool
        - dps_val: c_silent
          icon: "mdi:snowflake"
          value: quiet_cool
    - id: 13
      type: string
      name: temperature_unit
      mapping:
        - dps_val: c
          value: C
        - dps_val: f
          value: F
    - id: 14
      type: integer
      name: temp_set_f
      range:
        min: 41
        max: 104
      hidden: true
      optional: true
    - id: 15
      type: integer
      name: temp_current_f
      hidden: true
      optional: true
    - id: 21
      type: bitfield
      name: error
      mapping:
        - dps_val: 0
          value: "OK"
        - dps_val: 4
          value: "Water Flow Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 3
          value: "Water Flow Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 4
          value: "Frost Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 5
          value: "High Pressure Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 6
          value: "Low Pressure Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 9
          value: "Main Board - Line Control Communication Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 10
          value: "Frequency Module and Main Board Communication Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 12
          value: "Exhaust Over High Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 13
          value: "DC Fan Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 15
          value: "Inlet Water Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 16
          value: "External Coil Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 18
          value: "Exhaust Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 20
          value: "Frequency Module Abnormal Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 21
          value: "Ambient Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 23
          value: "Cooling Water Temperature Too Low Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 27
          value: "Outlet Water Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 29
          value: "Return Gas Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 32
          value: "Heating Water Temperature Too High Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 33
          value: "Outdoor Coil High Temperature Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 35
          value: "Compressor Current Protection"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2
        - dps_val: 42
          value: "Internal Coil Temperature Fault"
          icon: "mdi:water-boiler-alert"
          icon_priority: 2

secondary_entities:
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 13
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 21
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
