# Most DPS above 128 not implemented, as they do not appear in the log
# see #2561 for details if they show up in future.
name: Combo heat pump
products:
  - id: l01fseshej0xmz8x
    manufacturer: Axen
    model: KS-100W/EN8BP
entities:
  - entity: switch
    category: config
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 6
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 6
        type: bitfield
        name: fault_code
      - id: 130
        type: boolean
        optional: true
        name: fault_flag
  - entity: switch
    translation_key: sound
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
  - entity: climate
    dps:
      - id: 1
        type: boolean
        name: available
      - id: 102
        type: integer
        name: cool_temperature
        range:
          min: 70
          max: 250
        mapping:
          - scale: 10
            step: 10
      - id: 103
        type: integer
        name: temperature
        unit: C
        range:
          min: 250
          max: 650
        mapping:
          - scale: 10
            step: 10
            constraint: hvac_mode
            conditions:
              - dps_val: ["cool", "cool_hot_water"]
                value_redirect: cool_temperature
                range:
                  min: 70
                  max: 250
              - dps_val: ["auto", "auto_dhw"]
                value_redirect: auto_temperature
                range:
                  min: 70
                  max: 600
      - id: 105
        type: integer
        optional: true
        name: auto_temperature
        range:
          min: 70
          max: 600
        mapping:
          - scale: 10
            step: 10
      - id: 109
        type: string
        name: water_off
        hidden: true
        mapping:
          - dps_val: cool
            value: true
          - dps_val: heat
            value: true
          - dps_val: auto
            value: true
          - value: false
      - id: 109
        type: string
        name: water_on
        hidden: true
        mapping:
          - dps_val: cool
            value: false
          - dps_val: heat
            value: false
          - dps_val: auto
            value: false
          - value: true
      - id: 109
        type: string
        name: hvac_mode
        mapping:
          - dps_val: cool
            value: cool
            available: water_off
          - dps_val: heat
            value: heat
            available: water_off
          - dps_val: auto
            value: heat_cool
            available: water_off
          - dps_val: hot_water
            value: "off"
            available: water_on
          - dps_val: cool_hot_water
            value: cool
            available: water_on
          - dps_val: heat_hot_water
            value: heat
            available: water_on
          - dps_val: auto_dhw
            value: heat_cool
            available: water_on
      - id: 117
        type: boolean
        name: hvac_action
        mapping:
          - dps_val: false
            value: idle
          - dps_val: true
            constraint: hvac_mode
            conditions:
              - dps_val: ["cool", "cool_hot_water"]
                value: cooling
              - dps_val: ["heat", "heat_hot_water"]
                value: heating
              - dps_val: "hot_water"
                value: idle
              - dps_val: ["auto", "auto_dhw"]
                value: null
      - id: 106
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
  - entity: water_heater
    dps:
      - id: 1
        type: boolean
        name: operation_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: heat_pump
      - id: 104
        type: integer
        name: temperature
        unit: C
        range:
          min: 250
          max: 600
        mapping:
          - scale: 10
            step: 10
      - id: 108
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
      - id: 165
        type: boolean
        optional: true
        name: away_mode
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - entity: select
    translation_key: heat_pump_mode
    category: config
    dps:
      - id: 109
        type: string
        name: option
        mapping:
          - dps_val: cool
            value: cool
          - dps_val: heat
            value: heat
          - dps_val: auto
            value: auto
          - dps_val: hot_water
            value: hotwater
          - dps_val: cool_hot_water
            value: hotwater_cool
          - dps_val: heat_hot_water
            value: hotwater_heat
          - dps_val: auto_dhw
            value: hotwater_auto
  - entity: sensor
    name: Outlet temperature
    class: temperature
    category: diagnostic
    hidden: true
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10
  - entity: binary_sensor
    name: Frost protection
    class: cold
    category: diagnostic
    hidden: true
    dps:
      - id: 114
        type: boolean
        name: sensor
      - id: 110
        type: boolean
        optional: true
        name: protect_indicator
  - entity: binary_sensor
    translation_key: defrost
    category: diagnostic
    dps:
      - id: 115
        type: boolean
        name: sensor
  - entity: binary_sensor
    name: Pump
    class: running
    category: diagnostic
    dps:
      - id: 116
        type: boolean
        name: sensor
  - entity: sensor
    translation_key: ambient_temperature
    class: temperature
    dps:
      - id: 118
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    name: Exhaust temperature
    class: temperature
    category: diagnostic
    hidden: true
    dps:
      - id: 119
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    name: Return temperature
    class: temperature
    category: diagnostic
    hidden: true
    dps:
      - id: 120
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    name: Compressor frequency
    class: frequency
    category: diagnostic
    hidden: true
    dps:
      - id: 121
        type: integer
        name: sensor
        unit: Hz
        class: measurement
  - entity: sensor
    name: Main EEV
    category: diagnostic
    hidden: true
    dps:
      - id: 122
        type: integer
        name: sensor
        class: measurement
  - entity: sensor
    name: Auxiliary EEV
    category: diagnostic
    hidden: true
    dps:
      - id: 123
        type: integer
        name: sensor
        class: measurement
  - entity: sensor
    name: AC fan
    icon: "mdi:fan-auto"
    class: enum
    category: diagnostic
    hidden: true
    dps:
      - id: 124
        type: string
        name: sensor
        mapping:
          - dps_val: close
            value: "off"
          - dps_val: low_spd
            value: low
          - dps_val: high_spd
            value: high
  - entity: sensor
    name: DC fan 1
    icon: "mdi:fan-speed-1"
    category: diagnostic
    hidden: true
    dps:
      - id: 125
        type: integer
        name: sensor
        unit: rpm
        class: measurement
  - entity: sensor
    name: DC fan 2
    icon: "mdi:fan-speed-2"
    category: diagnostic
    hidden: true
    dps:
      - id: 126
        type: integer
        name: sensor
        unit: rpm
        class: measurement
  - entity: sensor
    class: volume_flow_rate
    category: diagnostic
    dps:
      - id: 127
        type: integer
        name: sensor
        unit: m³/h
        class: measurement
        mapping:
          - scale: 10
  - entity: sensor
    class: voltage
    category: diagnostic
    dps:
      - id: 128
        type: integer
        optional: true
        name: sensor
        unit: V
        class: measurement
  - entity: sensor
    class: current
    category: diagnostic
    dps:
      - id: 129
        type: integer
        optional: true
        name: sensor
        unit: A
        class: measurement
        mapping:
          - scale: 10
