name: Radiator heatpump
products:
  - id: 02ek8thasvo40fmd
    name: Deakon EVI A2pro
primary_entity:
  entity: climate
  dps:
    - id: 1
      type: boolean
      name: hvac_mode
      mapping:
        - dps_val: false
          value: "off"
          hidden: true
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: hot
              value: heat
              hidden: true
            - dps_val: cold
              value: cool
              hidden: true
            - dps_val: hotwater
              value: "off"
            - dps_val: hot_hotwater
              value: heat
            - dps_val: cold_hotwater
              value: cool
    - id: 2
      type: integer
      name: temperature
      unit: C
      range:
        min: 7
        max: 60
    - id: 3
      type: integer
      name: current_temperature
    - id: 4
      type: string
      name: mode
      hidden: true
    - id: 103
      type: string
      name: hvac_action
      mapping:
        - dps_val: "off"
          value: idle
        - dps_val: "on"
          value: heating
          constraint: mode
          conditions:
            - dps_val: cold
              value: cooling
        - dps_val: defrost
          value: defrosting
        - dps_val: antifrozen
          value: heating
    - id: 109
      type: string
      name: error_code_table
    - id: 110
      type: string
      name: error_code_table2
    - id: 111
      type: string
      name: driver_error_code1
    - id: 112
      type: string
      name: driver_error_code2
    - id: 113
      type: string
      name: sen_sys_error_code1
    - id: 114
      type: string
      name: sen_sys_error_code2
secondary_entities:
  - entity: select
    name: Combined mode
    icon: "mdi:heat-pump"
    category: config
    dps:
      - id: 4
        type: string
        name: option
        mapping:
          - dps_val: hot
            value: Heating only
          - dps_val: cold
            value: Cooling only
          - dps_val: hotwater
            value: Hot water only
          - dps_val: hot_hotwater
            value: Hot water + heating
          - dps_val: cold_hotwater
            value: Hot water + cooling
  - entity: select
    name: Temperature target
    category: config
    dps:
      - id: 5
        type: string
        name: option
        mapping:
          - dps_val: HotWater
            value: Hot water
            icon: "mdi:water-thermometer"
          - dps_val: Hot
            value: Heating
            icon: "mdi:home-thermometer"
          - dps_val: Cooling
            icon: "mdi:snowflake-thermometer"
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 13
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 13
        type: bitfield
        name: fault_code
  - entity: binary_sensor
    name: Anti-freeze
    class: cold
    category: diagnostic
    dps:
      - id: 103
        type: string
        name: sensor
        mapping:
          - dps_val: antifrozen
            value: true
          - value: false
  - entity: select
    name: Diagnostic query
    icon: "mdi:database-search"
    category: config
    dps:
      - id: 104
        type: string
        name: option
        mapping:
          - dps_val: "1"
            value: Version
          - dps_val: "2"
            value: Ambient temperature
          - dps_val: "3"
            value: Water tank temperature
          - dps_val: "4"
            value: Outlet temperature
          - dps_val: "5"
            value: Inlet temperature
          - dps_val: "6"
            value: Evaporator coil temperature
          - dps_val: "7"
            value: Exhaust gas temperature
          - dps_val: "8"
            value: Condensor coil temperature
          - dps_val: "9"
            value: Suction temperature
          - dps_val: "10"
            value: Module temperature
          - dps_val: "11"
            value: Main valve opening
          - dps_val: "12"
            value: Secondary valve opening
          - dps_val: "13"
            value: Exhaust valve opening
          - dps_val: "14"
            value: Fan speed
          - dps_val: "15"
            value: Running frequency
          - dps_val: "16"
            value: AC voltage
          - dps_val: "17"
            value: DC voltage
          - dps_val: "18"
            value: Overall current
          - dps_val: "19"
            value: Compressor current
          - dps_val: "20"
            value: Output power
          - dps_val: "21"
            value: EVI plate inlet
          - dps_val: "22"
            value: EVI plate outlet
          - dps_val: "23"
            value: Low pressure
          - dps_val: "24"
            value: High pressure
          - dps_val: "25"
            value: Error code
          - dps_val: "26"
            value: Limited frequency code
          - dps_val: "27"
            value: LCD version
          - dps_val: "28"
            value: MCU1 version
          - dps_val: "29"
            value: MCU2 version
          - dps_val: "30"
            value: MCU3 version
          - dps_val: "31"
            value: Error history
  - entity: sensor
    name: Diagnostic value
    category: diagnostic
    icon: "mdi:database-eye"
    dps:
      - id: 105
        type: integer
        optional: true
        name: sensor
  - entity: select
    name: Parameter ID
    icon: "mdi:database-cog"
    category: config
    dps:
      - id: 106
        type: string
        name: option
        mapping:
          - dps_val: d01
            value: Heating temperature
          - dps_val: d02
            value: Water tank temperature
          - dps_val: d03
            value: Cooling temperature
          - dps_val: d04
            value: Temperature hysteresis
          - dps_val: d05
            value: Basic control
          - dps_val: d06
            value: Electric heat temperature
          - dps_val: d07
            value: Electric heat start delay
          - dps_val: d08
            value: Coil defrost temperature
          - dps_val: d09
            value: Coil defrost end temperature
          - dps_val: d10
            value: Defrost interval
          - dps_val: d11
            value: Defrost time
          - dps_val: d12
            value: Temperature reached control
          - dps_val: d13
            value: Ambient temperature threshold
          - dps_val: d14
            value: Inlet-outlet temperature difference
          - dps_val: d15
            value: Water pump control
  - entity: number
    name: Parameter value
    category: config
    icon: "mdi:database-edit"
    dps:
      - id: 107
        type: integer
        name: value
        range:
          min: -100
          max: 999
