name: Pool heatpump
products:
  - id: qrlLaHWwIsZsV31f
    manufacturer: Phalén
    model: Calidi XP
    # - id: UNKNOWN
    #   manufacturer: Fairland
    #   model InverterPlus
entities:
  - entity: climate
    dps:
      - id: 1
        name: hvac_mode
        type: boolean
        mapping:
          - dps_val: false
            value: "off"
            icon: "mdi:hvac-off"
            icon_priority: 1
          - dps_val: true
            constraint: mode
            conditions:
              - dps_val: warm
                value: heat
              - dps_val: cool
                value: cool
              - dps_val: smart
                value: heat_cool
      - id: 102
        name: current_temperature
        type: integer
      - id: 103
        name: temperature_unit
        type: boolean
        mapping:
          - dps_val: false
            value: F
          - dps_val: true
            value: C
      - id: 105
        name: mode
        type: string
        icon_priority: 4
        mapping:
          - dps_val: warm
            icon: "mdi:hot-tub"
          - dps_val: cool
            icon: "mdi:snowflake"
          - dps_val: smart
            icon: "mdi:refresh-auto"
      - id: 106
        name: temperature
        type: integer
        mapping:
          - constraint: temperature_unit
            conditions:
              - dps_val: false
                range:
                  min: 55
                  max: 115
        range:
          min: 12
          max: 45
      - id: 107
        type: integer
        name: min_temperature
      - id: 108
        type: integer
        name: max_temperature
      - id: 117
        name: preset_mode
        type: boolean
        mapping:
          - dps_val: false
            value: sleep
          - dps_val: true
            value: boost
  - entity: sensor
    category: diagnostic
    name: Power level
    icon: "mdi:signal"
    class: power_factor
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: binary_sensor
    name: Water flow
    class: problem
    category: diagnostic
    dps:
      - id: 115
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 4
            value: true
          - value: false
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 116
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: true
            constraint: fault_code
            conditions:
              - dps_val: [0, 4]
                value: false
          - value: true
      - id: 115
        type: bitfield
        name: fault_code
      - id: 116
        type: bitfield
        name: fault_code_2
