name: Water heat pump
products:
  - id: 74jzzoqr2ghxyu1p
    manufacturer: Powerworld
    model: PW58410
entities:
  - entity: water_heater
    dps:
      - id: 1
        type: boolean
        name: operation_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: heat_pump
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: f
            value: F
          - value: C
      - id: 110
        type: integer
        name: temperature
        range:
          min: 0
          max: 99
      - id: 101
        type: base64
        optional: true
        name: current_temperature
        mask: "000000000000000000000000000000000000000000000000\
               00000000FFFFFFFF00000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - 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
      - id: 126
        type: string
        optional: true
        name: parameter_group_8
      - id: 140
        type: string
        optional: true
        name: power_statistics
  - entity: select
    translation_key: heat_pump_mode
    category: config
    dps:
      - id: 5
        type: string
        name: option
        mapping:
          - 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
  - entity: climate
    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: 111
        type: integer
        optional: true
        name: temperature
        range:
          min: 0
          max: 99
        mapping:
          - constraint: hvac_mode
            conditions:
              - dps_val: [cool, wth_cool]
                value_redirect: cool_temp
      - id: 112
        type: integer
        name: cool_temp
        optional: true
        hidden: true
        range:
          min: 0
          max: 99
  - 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
      - id: 199
        type: integer
        optional: true
        name: custom_fault_bit
  - entity: button
    translation_key: factory_reset
    category: config
    hidden: true
    dps:
      - id: 125
        type: boolean
        optional: true
        name: button
  - entity: sensor
    name: Inlet temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "FFFFFFFF0000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Outlet temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "00000000FFFFFFFF00000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    translation_key: ambient_temperature
    class: temperature
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "0000000000000000FFFFFFFF000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Exhaust temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000FFFFFFFF0000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Air return temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "00000000000000000000000000000000FFFFFFFF00000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Evaporator coil temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "0000000000000000000000000000000000000000FFFFFFFF\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Cooling coil temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000000000000000000000000000\
               FFFFFFFF0000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Main EEV opening
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000000000000000000000000000\
               0000000000000000FFFFFFFF000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Secondary EEV opening
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000FFFFFFFF0000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Compressor current
    class: current
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        unit: A
        mask: "000000000000000000000000000000000000000000000000\
               00000000000000000000000000000000FFFFFFFF00000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Heat sink temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000000000000000000000000000\
               0000000000000000000000000000000000000000FFFFFFFF\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: DC bus voltage
    class: voltage
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        unit: V
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               FFFFFFFF0000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Compressor frequency
    class: frequency
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        unit: Hz
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               00000000FFFFFFFF00000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Fan 1 speed
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        unit: rpm
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000FFFFFFFF000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Fan 2 speed
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        unit: rpm
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000FFFFFFFF0000000000000000\
               0000000000000000"
  - entity: sensor
    class: pressure
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        unit: bar
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               00000000000000000000000000000000FFFFFFFF00000000\
               0000000000000000"
  - entity: sensor
    name: Low pressure gas temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 101
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000000000000000000000000000FFFFFFFF\
               0000000000000000"
        mask_signed: true
      - id: 6
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - value: C
  - entity: sensor
    name: Heating capacity
    class: power
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: kW
        mask: "FFFFFFFF0000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mapping:
          - scale: 10
  - entity: sensor
    class: volume_flow_rate
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: m³/h
        mask: "00000000FFFFFFFF00000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mapping:
          - scale: 10
  - entity: sensor
    class: current
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: A
        mask: "0000000000000000FFFFFFFF000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    class: voltage
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: V
        mask: "000000000000000000000000FFFFFFFF0000000000000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        unit: W
        mask: "00000000000000000000000000000000FFFFFFFF00000000\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
  - entity: sensor
    name: Coefficient of performance
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        mask: "0000000000000000000000000000000000000000FFFFFFFF\
               000000000000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        mapping:
          - scale: 10
  - entity: number
    name: Pump speed
    category: config
    dps:
      - id: 140
        type: base64
        optional: true
        name: value
        mask: "000000000000000000000000000000000000000000000000\
               FFFFFFFF0000000000000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
        range:
          min: 0
          max: 100
  - entity: sensor
    name: Pump speed
    category: diagnostic
    dps:
      - id: 140
        type: base64
        optional: true
        name: sensor
        mask: "000000000000000000000000000000000000000000000000\
               00000000FFFFFFFF00000000000000000000000000000000\
               000000000000000000000000000000000000000000000000\
               0000000000000000"
