Fixing setup of Heat Pump Hot Water (Apricus) with LocalTuya

I have almost managed to get my Apricus Heat Pump water system to work using the Climate setting of LocalTuya (v5.2.1).

It has the mode settings of:

  • Auto (heat to 60c, triggers below 55c)
  • Eco (heat to 60c, triggers below 48c)
  • Boost (heat to 70c using heat pump and element)
  • Ele (heat to 70c using element only)

The DP ID for the HVAC mode is 4 and the instruction set on Tuya Developer platform is:

mode	Enum	
{
  "range": [
    "AUTO",
    "ECO",
    "BOOST",
    "ELE"
  ]
}

I needed to modify climate.py similar to this post, to get additional settings:

I added HVAC_MODE_COOL to:

from homeassistant.components.climate.const import (
    CURRENT_HVAC_HEAT,
    CURRENT_HVAC_IDLE,
    HVAC_MODE_AUTO,
    HVAC_MODE_HEAT,
    HVAC_MODE_OFF,
    HVAC_MODE_COOL,
    PRESET_AWAY,
    PRESET_ECO,
    PRESET_HOME,
    PRESET_NONE,
    SUPPORT_PRESET_MODE,
    SUPPORT_TARGET_TEMPERATURE,
    SUPPORT_TARGET_TEMPERATURE_RANGE,

then added a new mode set:

HVAC_MODE_SETS = {
    "AUTO/ECO/BOOST": {
        HVAC_MODE_HEAT: "AUTO",
        HVAC_MODE_AUTO: "ECO",
        HVAC_MODE_COOL: "BOOST",

By doing so, I can get LocalTuya to configure the heat pump and it shows as this thermostat.

I can switch it on and off, and change the modes, so that it will switch in the SmartLife app, and appropriately increase the set temp to 70c when on boost mode.

The remaining issue is that the thermostat reads the states as Heat, Auto and Cool (with the associated images) which does not reflect the actual settings on the device. Apparently I’m not supposed to directly modify HVAC_mode in homeassistant.components.climate.const to add HVAC_MODE_AUTO and HVAC_MODE_BOOST.

Is there someway to configure the climate.py in LocalTuya or else change the labels in the thermostat to be less confusing? I tried to make custom presets instead of modes but then the device became unavailable.

did you figure this out

Unfortunately I don’t have an answer for you, but I was also just integrating the same hot water cylinder with localtuya and the info you’ve given will definitely be helpful!

I don’t really use the different modes though, but what I am going to try is to also read in the power usage (shows up under Settings in the Smart Life app). It shows a total aggregated amount - presumably since the beginning of the cylinder’s life so I’m thinking I’ll need to watch it for changes and then generate a useful power consumption value from there (I need to understand how HA works with these different types of values first I think)

FYI I managed to get the energy consumption working - I realised I needed to add more entities for the device so I added 3x sensors - Energy, and 2x binary switches (I wanted to also monitor when the compressor is on and when the electric heater is on).

Having created the energy sensor it still wasn’t reporting in the statistics or Energy dashboard due to there being no state class defined, so I added this to my configuration.yaml file:

homeassistant:
    customize:
        # Add an entry for each entity that you want to overwrite.
        sensor.hot_water_power:
          state_class: total

Hope this will help someone one day!