name: Water heat pump
products:
  - id: hd8ubtj2bz38vuak
    manufacturer: ALMEVO
    model: HPHTXXXXXXXPW
#   - id: UNKNOWN
#     manufacturer: Powerworld
#     model: PW58330
entities:
  - entity: water_heater
    translation_only_key: water_air
    dps:
      - id: 1
        type: boolean
        name: operation_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            constraint: work_mode
            conditions:
              - dps_val: wth
                value: hotwater
              - dps_val: heat
                value: heat
              - dps_val: cool
                value: cool
              - dps_val: wth_heat
                value: hotwater_heat
              - dps_val: wth_cool
                value: hotwater_cool
      - id: 5
        type: string
        name: work_mode
        hidden: true
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
      - id: 108
        type: integer
        name: current_temperature
      - id: 118
        type: string
        optional: true
        name: parameter_group_1
      - id: 119
        type: string
        optional: true
        name: parameter_group_2
      - id: 120
        type: string
        optional: true
        name: parameter_group_3
      - id: 121
        type: string
        optional: true
        name: parameter_group_4
      - id: 122
        type: string
        optional: true
        name: parameter_group_5
      - id: 123
        type: string
        optional: true
        name: parameter_group_6
      - id: 124
        type: string
        optional: true
        name: parameter_group_7
  - entity: climate
    translation_key: heater
    dps:
      - id: 2
        type: string
        name: preset_mode
        mapping:
          - dps_val: smart
            value: comfort
          - dps_val: strong
            value: boost
          - dps_val: mute
            value: sleep
      - id: 5
        type: string
        name: hvac_mode
        mapping:
          - dps_val: wth
            value: "off"
          - dps_val: heat
            value: heat
            hidden: true
          - dps_val: cool
            value: cool
            hidden: true
          - dps_val: wth_heat
            value: heat
          - dps_val: wth_cool
            value: cool
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
      - id: 103
        type: integer
        optional: true
        name: current_temperature
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 6
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 15
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 15
        type: bitfield
        name: fault_code
  - entity: sensor
    name: Inlet temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Outlet temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 102
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Exhaust temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Air return temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Outer coil temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 106
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Cooling coil temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 107
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Main EEV opening
    category: diagnostic
    dps:
      - id: 109
        type: integer
        name: sensor
        unit: P
        class: measurement
  - entity: sensor
    name: Secondary EEV opening
    category: diagnostic
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: P
        class: measurement
  - entity: sensor
    name: Compressor current
    class: current
    category: diagnostic
    dps:
      - id: 112
        type: integer
        name: sensor
        unit: A
        class: measurement
  - entity: sensor
    name: Heat sink temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 113
        type: integer
        name: sensor
        class: measurement
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: DC bus voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 114
        type: integer
        name: sensor
        unit: V
        class: measurement
  - entity: sensor
    name: Compressor frequency
    class: frequency
    category: diagnostic
    dps:
      - id: 115
        type: integer
        name: sensor
        unit: Hz
        class: measurement
  - entity: sensor
    name: Fan 1 speed
    category: diagnostic
    dps:
      - id: 116
        type: integer
        name: sensor
        unit: rpm
        class: measurement
  - entity: sensor
    name: Fan 2 speed
    category: diagnostic
    dps:
      - id: 117
        type: integer
        name: sensor
        unit: rpm
        class: measurement
  - entity: button
    translation_key: factory_reset
    category: config
    dps:
      - id: 125
        type: boolean
        optional: true
        name: button
  - entity: sensor
    name: Heating capacity
    class: power
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: kW
        mapping:
          - scale: 10
        mask: "FFFFFFFF0000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: sensor
    name: Current water flow rate
    class: volume_flow_rate
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: m³/h
        mapping:
          - scale: 100
        mask: "00000000FFFFFFFF00000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: sensor
    name: Overall current
    class: current
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: A
        mapping:
          - scale: 10
        mask: "0000000000000000FFFFFFFF000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: sensor
    name: Overall voltage
    class: voltage
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: V
        mask: "000000000000000000000000FFFFFFFF0000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: sensor
    name: Overall power
    class: power
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: W
        mask: "00000000000000000000000000000000FFFFFFFF00000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: sensor
    name: Coefficient of performance
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        class: measurement
        mapping:
          - scale: 10
        mask: "0000000000000000000000000000000000000000FFFFFFFF\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: sensor
    name: Energy today
    class: energy
    category: diagnostic
    hidden: unavailable
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: kWh
        class: total_increasing
        mask: "000000000000000000000000000000000000000000000000\
               00000000000000000000000000000000FFFFFFFF00000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
      - id: 140
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
