Automate heatpump - help?

Hi, I got a heat pump and access to controlling it in HA.

Read about the generic thermostat integration and are using that for regular heaters that turns on and off when required.

That will however not work on heat pump, as they use longer time to heat the house and should be on all the time 24/7.

Have anyone had any luck automating pumps like this?
My main problem is that the temp adjusted on the pump is not always sufficient.

If I set it to 21c now it hold a comfortable temp, and room temp is around 20c.
The problem is when its getting colder outside, the pump will not adjust so the room keeps 20c.

I then have to manually increase temp 1 degree, and another 1 degree when it gets even colder.

Not very problematic when you know that and can plan ahead, but if its possible to automate something, why not

and one other thing with heat pumps is that they use a lot of power if temp on pump is increased too high.
say its 19c in the room measured with external temp sensor and pump wants to reach that and is set to 21c, the best solution is then to let it run on 22c for a while to see if it can reach target temp, not ramp the pump up to 24-25c to reach it, because then a extra heater kicks inn and uses a lot more power.

So a bit more complicated than just a regular heater

What do you think of the idea of ​​recording both the inside temperature and the outside temperature and deriving the comfortable inside temperature from this?

Example for constant indoor temperature:
Outside 16°C and more = inside 20°C = pump at 21°C constant
if outside 16°C and more AND inside <20°C, then pump for 1h (or x time units) to 22°C

Outside 8-15°C = inside 21°C = pump at 22°C
if outside 8-15°C AND inside <21°C, then pump for 1h (or x time units) to 23°C

Outside 2-8°C = inside 22°C = pump constantly at 23°C
if outside 2-8°C AND inside <22°C pump for 2h (or x time units) pump at 25°C

Outside below 2°C = inside 22°C = pump constantly at 25°C
when outside is below 2°C AND inside <22° pump at >25°C until inside 22°C is reached (then “pump constantly at 25°C” applies again)

With such a scheme, the lowest power consumption should be achieved.

Excuse my bad English, I’m a native German speaker and use google translator

Use " conditions and sequence "

Example:
My code that I used for ventilation

``````alias: ventilation control
description: ''
trigger:
- platform: state
entity_id: sensor.outside
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.outside
below: '11'
- condition: time
before: '08:00'
after: '21:00'
sequence:
- service: climate.set_temperature
data:
temperature: 22.7
target:
entity_id: climate.Vent
- conditions:
- condition: numeric_state
entity_id: sensor.outside
below: '11'
- condition: time
after: '08:00'
before: '21:00'
sequence:
- service: climate.set_temperature
data:
temperature: 23
target:
entity_id: climate.Vent
- conditions:
- condition: numeric_state
entity_id: sensor.outside
above: '11'
below: '14'
sequence:
- service: climate.set_temperature
data:
temperature: 23.1
target:
entity_id: climate.Vent
- conditions:
- condition: numeric_state
entity_id: sensor.outside
above: '14'
below: '17'
sequence:
- service: climate.set_temperature
data:
temperature: 23.3
target:
entity_id: climate.wentylator_sklep
- conditions:
- condition: numeric_state
entity_id: sensor.outside
above: '17'
below: '20'
sequence:
- service: climate.set_temperature
target:
entity_id: climate.wentylator_sklep
data:
temperature: 23.5
- conditions:
- condition: numeric_state
entity_id: sensor.outside
above: '20'
sequence:
- service: climate.set_temperature
target:
entity_id: climate.Vent
data:
temperature: 26
default:
- service: climate.set_temperature
data:
temperature: 25
target:
entity_id: climate.Vent
mode: restart
``````