Add support for heat pumps in the Energy Dashboard

Hi!

I have a Nibe ground source heat pump and I’ve integrated it to HA through its Modbus integration. This gives me sensors for energy production (both heat and hot water) as well as its power usage.

At first I used the heat pumps production as solar cells in the Energy Dashboard, as it can be viewed as stored solar energy. However the solar section is targeting electric energy and by using it for the heat pump it added the heat pump production to the overall energy consumption and thereby disturbing the fosil footprint.

Then I saw, in one of the HA forums, another user using the Gas section. As Gas produces heat its concept is maybe closer to a heat pump. Although this seems to be a better solution, there are a couple of issues:

  • There is no cost related to the heat produced by the heat pump. I suppose you could use a negative costs to see what savings you’ve made.
  • There is no way of indicating how much electric energy that has been put into the heat pump.
  • There is no indication on how efficient the heat pump is.

I suggest that the Energy Dashboard adds an additional type of energy “entity” for heat pumps which addresses the above shortcomings. This will give the user a more complete overview of his/her energy consumption and production.

/Jörgen

Awesome and also with the calculation of cop.
That would be awesome.
Most of the heatpump heating systems also have thermic output energy for cop calculation.

This would be a great feature. I have a similar request but for solar collector panels which produce hot tap water. This basically the same story: electricity is used to drive a circulation pump, this transports solar heat from the panels to the tap water tank via a transport medium. The control system outputs the captured heat energy in kWh. Would be nice to visualize this in the energy dashboard. This way you know how much heat is needed to heat the tap water.

second this. There are countless discussions on here about best way to calculate COP, umpteen variants of templates all slightly different.
If there was a “heat pump” section of the energy dashboard, fed with the “energy consumed” and “energy produced” sensors from the heat pump (up to the user how to get those), calculating COP in a consistent way, then that’d be very useful. and showing the green credentials of HA, as all you can add right now to the energy dashboard is gas heating :frowning:

Currently I use Grafana for an overview of the heat pump’s in-, output and efficiency. Unfortunately I didn’t enable Grafana and Influxdb at new years so a yearly view with each much doesn’t work properly (it ends the months on the 23rd or similar) but the monthly view is alright, with each day displayed.

P.S.

As seen in the picture, when the outdoor temperature gets higher less heat is consumed and the COP around 4 decreases as the hotwater production isn’t that efficient due to its higher temperature. The same can be said about when the temperature drops as the temperature on the radiators need to increase and has the result that the COP will go down again. Somewhere 5 C there seems to be an optimum COP.

Note that we have a down hole heat pump and high temperature radiators. With floor heating you’ll get higher COP as its temperature is much lower at the same heat production level.

I am in a similar situatiën with my Heliotherm soil based heatpump, which I just managed to include in Home Assistant. I would like to add it to the energy section, as I plan to make my own smart grid with solar panels, various appliances and the heat pump. Nice for the situation when the policy on back production of solar enrgy changes. I therfore fully support the request by Jorgen.

regards Cor

I think this is still a relevant feature request in 11/2024.

I also have a MyUplink (Former NIBE) heatpump with ground source heat in HA but now ways to visualize much of its functions… this would be a great feature!

Same/similar feature request at:

Could you share that dashboard? I’ve been storing my long term stats in InfluxDB and I’m using Grafan with it too. I also have Nibe Heatpump connected via MODBUS using nibegw, so I guess I could probably reuse a lot of what you have.

There is no real “Dashboard” I just a used of the Grafana graph editor.

The query options altered:

  • Min interval: 1M , i.e. 1 month

Three energy entities are use:

  • Heating (called Värme) - heating_including_int_add_heat_31578.
  • Hot water (called Varmvatten) - hot_water_including_add_heat_31576
  • Consumption (called Förbrukning) - enery_spent_nibe

The last one is an “integration” sensor which uses the power sensor available from the Nibe integration:

sensor riemann:
  - platform: integration
    source: sensor.s1255_anvand_effekt
    name: energy_spent_nibe
    unit_prefix: k
    round: 2

There’s a limitation in the “integration” integration as it doesn’t set a proper “state_class”. Hence I needed to add it manually:

homeassistant:
     ....
  customize:
     ....
     sensor.energy_spent_nibe:
        state_class: total_increasing

Further the “s1255_anvand_effekt” is a template sensor as I have had problems with bogus values from the Nibe integration sensor. It may not actually be a problem anymore as I’ve switched from Modbus to the “proper” Nibe integration. Anyway the Nibe power template sensor definition is as:

template:
       .....
    - sensor:
          name: "S1255 använd effekt"
          unit_of_measurement: "W"
          device_class: power
          unique_id: s1255.anvand.power
          state: >
             {% set s1255_power = states('sensor.instantaneous_used_power_32167') %}
             {% if is_number(s1255_power) %}
                {% set s1255_power = s1255_power | float(0) %}
                {{ s1255_power }}
             {% else %}
                None
             {% endif %}

Each of the entities in the Grafana diagram uses the following settings:

  • From default KWh WHERE entity_id =
  • SELECT field (value) last() difference()
  • GROUP BY time($__interval= fill (previous)
  • TIMEZONE ORDER BY TIME ascending
  • LIMIT SLIMIT
  • FORMAT AS Time series ALIAS

In addition to the entities I also added two Grafana expressions. The first is called “Produktion”, “Production” in English:

  • Operation Math
  • Expression $Varmvatten + $Värme

The second is called “COP”.

  • Operation Math
  • Expression ($Varmvatten + $Värme)/$Förbrukning

Then I used panel options to get a legend which includes the “Max”, “Mean”, “Min” and “Total” figures. These figures may not work for all entities, e.g. the COP, but is handy for others.

I haven’t really got to fix the alignment of the time series. E.g. selecting the time window “This year so far” split the diagram bars on the 13th as it is the 13th of September today. Further the “1M” “macro” seems to be recalculate to a 30 days time window for each monthly bar which is not always correct, around 50% correct. The 13th seem to stick even if you select another time window by select a specific time range. I don’t really understand what is going on here.