Quick Summary (TL;DR)
Heat-pump COP in Home Assistant is only as trustworthy as the heat and electricity measurements behind it. COP is delivered thermal power divided by electrical input power over the same instant or suitably aligned measurement window. A daily or seasonal performance figure is the ratio of total delivered heat to total electricity over that period—not the arithmetic average of instantaneous COP readings. Accurate heat measurement needs a suitable flow meterPriceAliExpress price and matched flow/return temperature sensors, or a documented manufacturer heat-energy output with its uncertainty understood.
Our recommendation: use a dedicated heat meter for thermal kWh, a properly scoped electricity meterPrice for input kWh, and calculate daily and seasonal ratios from their cumulative energy readings. Begin with native heat-pump telemetry if that is all your system offers, but label it as estimated when the manufacturer estimates heat rather than measuring it. Keep the heat pump’s native controller responsible for safety and defrost.
- Instantaneous COP: thermal kW ÷ electrical kW, meaningful only with synchronised measurements and an operating-state filter.
- Daily COP: daily thermal kWh ÷ daily electrical kWh from matching boundaries.
- Seasonal performance: total delivered heat ÷ total electricity across the defined heating season; state whether DHW, pumps and backup heating are included.
- Never calculate COP from flow/return temperature difference alone. Water-flow rate is also required.
- Do not average hourly COP values equally. Sum energy first, then divide.
What COP actually means—and what it does not
A heat pump moves thermal energy from a source such as outside air into a heating circuit. A COP of 3 means approximately 3 kWh of useful thermal energy delivered per 1 kWh of electrical input for the specified test boundary and period. COP is a ratio, not an electrical efficiency percentage and not a promise that a particular installation will achieve the manufacturer’s catalogue value. Outside temperature, flow-water temperature, defrost, domestic hot water, compressor cycling and auxiliary electricity all change measured performance.
Instantaneous COP can fluctuate dramatically during starts, stops and defrost. Seasonal performance is usually more useful for comparing a real installation over time. Distinguish measured seasonal performance factor (SPF) from standardised manufacturer SCOP values, which are calculated under defined test assumptions and boundaries. Do not compare two figures unless their included components and operating periods match.
| Metric | Calculation | Best use | Common trap |
|---|---|---|---|
| Instantaneous COP | Thermal power (kW) / electrical power (kW) | Steady-state diagnostics | Dividing asynchronous or near-zero readings |
| Daily COP | Daily delivered thermal kWh / daily input kWh | Daily monitoring | Mismatched midnight boundaries |
| Monthly COP | Monthly heat kWh / monthly input kWh | Weather and operation comparisons | Averaging daily ratios without weighting |
| Seasonal SPF | Seasonal delivered heat / seasonal electrical input | Whole-season evaluation | Comparing unlike system boundaries |
| Manufacturer SCOP | Standardised seasonal test methodology | Product comparison under stated conditions | Treating it as a guaranteed house-specific outcome |
Start by defining the measurement boundary
The most important design decision is where the heat and electricity measurements begin and end. A heat meter on the primary heat-pump circuit may measure energy leaving the appliance. A meter on the secondary heating loop downstream of a buffer tank may measure energy delivered to emitters. These are not interchangeable when buffer losses, hydraulic separation or domestic hot-water circuits are present. Similarly, a meter on the compressor supply may exclude circulation pumps, control electronics, crankcase heaters or an electric immersion backup.
A defensible Home Assistant dashboard should state the boundary in its sensor names and dashboard notes: for example, “primary heat-pump thermal output” and “heat pump + backup heater electrical input”. This avoids silently changing the meaning of COP after a wiring or plumbing modification.
| Boundary | Heat numerator | Electricity denominator | Interpretation |
|---|---|---|---|
| Appliance-only | Thermal energy leaving appliance | Appliance electrical feed | Appliance performance, depending on included auxiliaries |
| Heat-pump system | Thermal energy from heat pump to system | Compressor, controls and relevant pumps | System-level efficiency |
| Space-heating delivery | Heat delivered to emitter circuit | All electricity used to provide that heat | Building heating performance; buffer losses matter |
| Space heating plus DHW | Heat supplied to both services | Electrical input for both services | Mixed operating performance; DHW usually lowers ratio |
| With electric backup | Heat includes backup heater contribution | Electricity includes backup heater | Real total efficiency; can approach 1 during resistive-only operation |
What hardware is required?
For the heat side, a calibrated thermal-energy meterPrice normally combines a flow sensor, a matched flow/return temperature pair and calculation electronics. Heat meters may expose cumulative kWh through M-Bus, Modbus, pulse or a manufacturer gateway. The exact interface must be checked against the meter revision and module. A heat pump may instead expose internally estimated delivered energy; useful, but it is not necessarily independent heat metering. A pair of cheap surface probes alone cannot determine delivered heat.
For the electrical side, use a correctly installed energy meter that records cumulative kWh for the circuits in scope. An inverter compressor can have variable power factor and non-sinusoidal currents; do not estimate kWh by multiplying an assumed voltage by CT current. Use a meter specified for the supply arrangement and load. A qualified electrician must handle distribution-board installation and any mains-side current transformers.
| Device | Essential measurement | Integration options | Watch out for |
|---|---|---|---|
| Calibrated heat meter | Flow, temperature pair, thermal kWh | Modbus, M-Bus gateway, pulse, native | Fluid type, placement, update interval |
| Electricity energy meter | Real electrical kWh | Modbus, local API, pulse | Circuit boundary, phase mapping |
| Native heat-pump integration | Vendor-reported heat and power/energy | Documented local API or gateway | Estimates, missing auxiliaries, delayed updates |
| Surface temperature probes | Pipe temperature trends | ESPHome, low-voltage gateway | Cannot give heat kWh without flow |
| Home Assistant | History, aggregation, dashboards | Energy and utility-meter helpers | Units, resets, availability and data gaps |
The equations, with realistic examples
For water near typical heating temperatures, a useful approximate instantaneous formula is thermal power (kW) ≈ 1.163 × volumetric flow (m³/h) × ΔT (K). It is an approximation for water, not a universal glycol formula. At 0.90 m³/h and 4.0 K, thermal power is approximately 4.19 kW. If the electrical input measured at that instant is 1.40 kW, illustrative COP is 2.99. If water flow was only assumed rather than measured, this number should not be presented as verified COP.
For energy over a period, use COP(period) = Δthermal_energy_kWh / Δelectrical_energy_kWh. Suppose the thermal meter increases from 12,450 to 12,478 kWh and the electricity meter from 4,200 to 4,209 kWh: 28 / 9 = 3.11. If the heat meter excludes hot-water production but the electricity meter includes it, that 3.11 is not a valid matched-boundary result.
| Period | Heat delivered | Electricity consumed | Ratio |
|---|---|---|---|
| Hour A | 6 kWh | 2 kWh | 3.00 |
| Hour B | 1 kWh | 1 kWh | 1.00 |
| Combined | 7 kWh | 3 kWh | 2.33 |
| Incorrect equal hourly average | — | — | 2.00 |
The last row illustrates why equal averaging of COP values gives the wrong combined answer. Energy-weighted aggregation is mandatory. If electricity input is zero or close to zero, return unavailable rather than a huge COP number. Do not discard standby electricity from daily totals merely because there was no active compressor heating during that interval.
Getting the readings into Home Assistant
Prefer supported native integrations or a documented gateway that exposes cumulative energy totals. Where Modbus is used, the register map, byte order, scaling, signedness and polling limits must come from the exact manufacturer documentation. M-Bus and Modbus are different protocols; an M-Bus meter generally needs a suitable master/gateway rather than an ordinary RS485 Modbus adapter. Pulse-output heat meters need the correct pulses-per-kWh setting and nonvolatile pulse counting to avoid losing totals on reboot.
Home Assistant’s Energy dashboard works best with appropriate cumulative energy sensors in kWh and correct metadata, including device class energy and state class total_increasing where the integration’s counter behaviour supports it. A sensor reporting instantaneous thermal power in kW is not interchangeable with thermal energy in kWh. Integration of power to energy requires correct sampling and unit conversion, and may amplify gaps or stale values.
- Confirm the sensor’s unit: W, kW, Wh and kWh are not interchangeable.
- Confirm whether a counter is cumulative, per-cycle, daily reset or estimated.
- Check update timestamps and unavailable states before calculating a ratio.
- If a device resets counters, verify that Home Assistant handles the reset without double-counting.
- Separate space heating, domestic hot water and backup heating if the meter arrangement allows.
- Retain source readings so derived COP can be audited later.
A safe daily COP template pattern
A practical approach is to create daily deltas of cumulative heat and electricity energy sensors using the Home Assistant Utility Meter integration, then derive a daily ratio. The example below assumes that sensor.hp_heat_total_kwh and sensor.hp_electricity_total_kwh are already valid cumulative energy sensors with matched measurement boundaries. Replace those placeholders with actual entity IDs.
utility_meter:
hp_heat_daily:
source: sensor.hp_heat_total_kwh
cycle: daily
hp_electricity_daily:
source: sensor.hp_electricity_total_kwh
cycle: daily
template:
- sensor:
- name: "Heat pump daily COP"
unique_id: hp_daily_cop_ratio
state_class: measurement
availability: >
{{ has_value('sensor.hp_heat_daily') and
has_value('sensor.hp_electricity_daily') and
states('sensor.hp_electricity_daily') | float(0) > 0.05 }}
state: >
{{ (states('sensor.hp_heat_daily') | float(0) /
states('sensor.hp_electricity_daily') | float(1)) | round(2) }}
The 0.05 kWh denominator threshold is an illustrative display guard, not a universal scientific cutoff. The displayed ratio early in a day can be unstable and should be labelled provisional. For a completed daily performance record, snapshot or analyse the previous completed day rather than treating a partially accumulated current-day figure as final. The example assumes the installed Home Assistant version accepts the shown template structure; validate YAML before reloading.
A robust dashboard layout
A useful dashboard places raw cumulative readings alongside derived ratios. Start with today’s thermal kWh, today’s electrical kWh, daily COP, flow and return temperatures, compressor state and outdoor temperature. Add monthly thermal/electricity energy and an energy-weighted monthly ratio. Plot the two underlying energies together: a COP chart alone hides missing or implausible input data.
| Dashboard card | Entities | Why it matters |
|---|---|---|
| Daily energy totals | Thermal kWh, electrical kWh | Shows the evidence for COP |
| Daily COP | Heat divided by electricity | Quick trend, provisional during day |
| Operating state | Heating, DHW, defrost, idle | Explains transient changes |
| Water temperatures | Flow, return, outside air | Diagnoses water-temperature penalty |
| Backup heat | Auxiliary heater runtime/energy | Explains low system COP |
| Data quality | Last update, unavailable sensors | Prevents false confidence |
Ten common COP errors—and how to recognise them
| Error | Typical symptom | Correction |
|---|---|---|
| Dividing temperatures rather than thermal power | COP changes with pipe temperature but not flow | Use measured heat energy and electrical energy |
| Assumed fixed pump flow | COP unexpectedly stable or optimistic | Measure actual flow or use calibrated heat meter |
| Wrong electrical circuit | Implausibly high COP | Include relevant compressor and auxiliary loads |
| Mixed heat/electric boundaries | Poor agreement with bills | Align space heating, DHW and backup scopes |
| Averaging instantaneous COP | Seasonal result differs from total kWh ratio | Sum heat and electricity first |
| Power/energy unit confusion | COP 1,000 times too high/low | Check W/kW and Wh/kWh |
| Stale data or mismatched polling | Spikes during compressor transitions | Align time windows and flag stale values |
| Defrost misclassification | Negative or odd short-term COP | Analyse full periods including defrost |
| Meter resets or pulse losses | Sudden impossible energy changes | Check counter persistence and statistics |
| Glycol or sensor offset | Systematic thermal-power error | Use correct fluid properties and calibrated sensor pair |
Defrost, hot water, immersion heaters and standby
Air-source heat pumps periodically defrost the outdoor heat exchanger in cold and humid conditions. During a defrost event, energy flows and sensor readings can temporarily reverse or become difficult to interpret. Do not cherry-pick only stable heating minutes if the goal is seasonal efficiency: defrost energy is part of real operation. An instantaneous COP chart may be suppressed during defrost for readability, but daily totals should account for the actual measured energy exchanges according to the heat meter’s accounting method.
Domestic hot-water production often requires higher temperatures than space heating and therefore can have a different performance ratio. Some systems use a resistive immersion heater for hygiene cycles or backup; its thermal output and electrical consumption need consistent inclusion. Idle pumps, electronics and crankcase heaters also consume electricity. A performance figure that excludes these loads can be useful for appliance diagnosis, but should not be presented as whole-system seasonal efficiency.
Why a manufacturer-reported COP may differ from your meters
A manufacturer integration might calculate heat production from internal flow and temperature models, estimate compressor power or omit external pumps. The Home Assistant integration may expose daily counters that reset at different times from your utility meter. Independent meters may sit on different pipework and electrical circuits. Differences are not necessarily evidence that either system is defective: first draw a boundary diagram, list included loads and compare totals over a complete period.
If your measured heat is consistently lower than the manufacturer estimate, inspect the meter’s location, flow configuration, sensor matching and whether a buffer tank lies between measurement points. If electricity is consistently higher, check backup heaters, pumps and standby loads. Do not adjust a calibration constant merely to make the COP agree with an expected catalogue figure.
Commissioning and verification checklist
- Document exact heat-meter and electricity-meter installation points with photographs and labels.
- Record whether the heat meter measures primary heat-pump output or secondary distribution output.
- Verify actual water/glycol composition and heat-meter settings.
- Check both temperature sensors are a matched, correctly installed pair.
- Compare electrical meter readings against a known billing period, accounting for other circuits.
- Check energy counters over a 24-hour interval and across a Home Assistant restart.
- Confirm how the system reports defrost, domestic hot water and resistive backup.
- Ensure all automation failures leave manufacturer protections, frost protection and minimum flow intact.
- Keep a written note of firmware and integration versions when comparing seasonal data.
Frequently asked questions
Can Home Assistant calculate COP without a heat meter?
It can display a manufacturer-estimated COP or calculate a rough estimate when reliable heat-output telemetry is available. Two temperature sensors alone are insufficient because water flow is missing.
What is a good heat-pump COP?
There is no universal target. It depends on outside temperature, water temperature, DHW use, equipment and measurement boundary. Compare against the exact manufacturer operating conditions and your own seasonal trend.
What is the difference between COP and SCOP?
COP describes performance at a point or defined period. SCOP is a standardised seasonal rating based on specified conditions. Your measured seasonal SPF is specific to the installation and its chosen boundary.
Should I average hourly COP values?
No. Add the thermal kWh and electrical kWh across the hours and divide the totals.
Does defrost count?
Yes for real seasonal system performance. Short-term instantaneous ratios during defrost may be misleading, but energy effects belong in the period totals.
Should circulation pumps be included?
State the boundary. For whole-system performance, include relevant pumps and auxiliaries. Appliance-only figures may use a narrower boundary.
Does a DS18B20 measure heat output?
No. It measures temperature. Heat-output calculation also requires accurate flow and temperature difference, ideally from a suitable heat meter.
Can I use Modbus readings?
Yes, if the exact device exposes documented heat and electricity energy registers. Verify scaling, reset behaviour and whether values are measured or estimated.
Why is my COP infinite at midnight?
The daily electricity denominator may still be zero or very small after a reset. Suppress the ratio until enough valid data has accumulated.
Can I compare COP across houses?
Only cautiously. Building heat loss, flow temperatures, weather, hot-water demand and metering boundaries differ.
What if my heat meter uses M-Bus?
Use a compatible M-Bus master or gateway. M-Bus is not the same as Modbus despite the similar names.
Is a heat-pump energy dashboard a substitute for commissioning?
No. It can reveal patterns and errors but does not replace professional hydraulic, electrical and refrigeration checks.
A measurement-boundary diagram you can actually use
Before looking at a dashboard, draw a box around the equipment whose performance you intend to measure. The heat and electricity readings must correspond to that same box. In a simple air-to-water installation the compressor, outdoor fan, inverter electronics, internal pumps, controls and built-in electric heaters may all be connected to different internal or external circuits. The primary water circuit may also serve a domestic hot-water cylinder through a diverter valve. There is no universal definition of “heat pump COP” without specifying which of these items are included.
A useful way to label your Home Assistant charts is “heat-pump unit COP: all monitored operating modes, unit electricity only” or “whole-system seasonal performance: space heating plus DHW, circulation and backup electricity included”. A naked “COP 4.2” can be technically correct for one boundary and misleading for another. A number taken from a product sheet is yet another comparison: its test conditions are controlled and may not represent the installation.
| Boundary / reported metric | Thermal numerator | Electrical denominator | Why it differs |
|---|---|---|---|
| Unit operating COP | Heat delivered at selected primary water boundary during same period | Electricity supplied to heat-pump unit as defined | May omit external pumps, DHW backup and distribution losses |
| Whole-system seasonal performance | Space-heating and DHW thermal energy delivered at chosen boundaries | Heat pump, relevant pumps, backup heat and controls | Wider boundary generally changes the ratio |
| Space-heating-only COP | Heat delivered in space-heating mode | Electricity attributable to that mode | Needs trustworthy valve/mode accounting |
| DHW-only COP | Heat transferred to cylinder charging circuit | Electricity attributable to DHW charging | Usually affected by higher supply temperature |
| Manufacturer estimated COP | Manufacturer-calculated heat estimate | OEM-reported electricity or modelled input | Unknown internal algorithm can differ from external meters |
| Indicative COP from estimated flow | Calculated heat using unverified nominal flow | Measured electrical input | Not valid as a precise efficiency result |
For example, imagine the heat pump transfers 8,000 kWh of useful water-side heat over a period. Its dedicated unit meter reads 2,400 kWh, while a separately metered immersion heater uses 300 kWh and external pumps consume 120 kWh. The unit-only ratio is 8,000 ÷ 2,400 = 3.33. If that 8,000 kWh excludes the immersion heat delivered, whole-system useful heat would need to include the immersion contribution, approximately 8,300 kWh if it enters the same useful boundary; its electricity would be 2,820 kWh, giving approximately 2.94, subject to losses and exact metering positions. Simply adding all electricity to the denominator while omitting the immersion heat from the numerator describes a different metric. Neither calculation is “wrong” if it is labelled clearly; mixing the two without explanation is wrong.
Measurement quality: a hierarchy from indicative to high confidence
A heating controller may expose supply temperature, return temperature, compressor speed, estimated thermal output and calculated energy totals through Modbus, MQTT or its native integration. That is excellent information for diagnostics, and in some products it may be very accurate. However, availability of a numerical value does not prove that it was independently measured. Some devices derive thermal output from lookup tables, assumed flow, internal power estimates or values calibrated for a different installation. Record where each sensor originates and what it represents.
| Monitoring level | Heat data source | Electricity data source | Appropriate claim |
|---|---|---|---|
| 1: Electrical trend | None | CT clampAliExpress price or unit reported power | Electrical usage, cycling and demand only |
| 2: Temperatures | Two pipe probes, no measured water flow | CT or energy meter | Temperature trends, not measured COP |
| 3: Manufacturer telemetry | OEM heat estimate, documented data fields | OEM or dedicated energy meter | Operational/estimated performance with caveats |
| 4: Metered energy | Heat meter measuring flow and differential temperature | Dedicated cumulative electricity meter | Measured COP within stated meter uncertainty |
| 5: Auditable plant/system boundary | Appropriate meters for heating, DHW and auxiliary paths | Multiple correctly scoped meters, aligned clocks | Whole-system performance with transparent exclusions |
For a retrofit, start with the OEM data and a dedicated electricity meter if the priority is fault diagnosis. Add a suitable inline heat meter if the goal is a defensible seasonal comparison. OpenEnergyMonitor explicitly differentiates electricity-and-temperature monitoring from true COP monitoring, because the latter needs measured heat output. It also recommends suitable inline metering where higher accuracy matters; its heat-pump monitoring guide is useful for evaluating the trade-offs.
Do not install a consumer smart plug in the supply to a hard-wired heat pump or its immersion heater. Dedicated energy instrumentation must be selected for the actual voltage, phases, supply current and electrical enclosure and installed by a suitably qualified electrician. The water-side meter may require pipework isolation, drain-down and recommissioning by a competent heating engineer.
Thermal-power calculation with correct water units and glycol correction
Thermal power is determined by the mass flow of the heat-transfer fluid multiplied by its specific heat capacity and the temperature difference between flow and return. In SI units: Pthermal (W) = ṁ (kg/s) × cp (J/kg·K) × ΔT (K). For a known volumetric flow, mass flow equals volumetric flow multiplied by density. The common water shortcut—P (kW) ≈ 1.16 × flow (m³/h) × ΔT (K)—assumes liquid water near normal heating conditions and is an approximation, not a universal constant for every fluid mixture.
| Quantity | Correct unit | Typical mistake | Why it matters |
|---|---|---|---|
| Volumetric flow | m³/h or L/min | Reading 16 L/min as 16 m³/h | Power error factor 60 when converting L/min to m³/h |
| Mass flow | kg/s | Treating density as universally constant | Glycol concentration and temperature can affect conversion |
| Specific heat capacity | J/(kg·K) | Using water value for high-glycol mixtures | Heat output is biased |
| Temperature difference | K (numerically same as °C difference) | Mixing temperatures across hydraulic boundaries | Creates fictitious heat output |
| Thermal power | kW | Confusing heat output kW with cumulative kWh | COP requires matched power or energy basis |
| Thermal energy | kWh | Dividing instantaneous kW by a daily kWh counter | Dimensionally meaningless result |
Worked example: measured water flow is 0.82 m³/h; the outlet is 36.4°C and return is 32.1°C. Then ΔT = 4.3 K, and approximate output is 1.16 × 0.82 × 4.3 = 4.09 kW. If simultaneous input is 1.29 kW, apparent operating COP is approximately 3.17. This says nothing about seasonal performance until the operating period, defrosts, hot-water charging and ancillary electricity are included.
For another example, a data feed reports water flow in litres per minute. At 16.0 L/min, the equivalent is 0.96 m³/h. With ΔT = 4.0 K, thermal power is 1.16 × 0.96 × 4.0 = 4.45 kW. Treating 16 as cubic metres per hour would produce the absurd result of 74.2 kW. Plausibility checks against the heat pump’s rated output should catch this before it contaminates long-term statistics.
If the heating system contains glycol, ask the installer for the mixture type and nominal concentration, then refer to documented fluid properties for the relevant temperature. Do not use the same water shortcut as proof of metered COP. Some integrated heat meters can be configured for specific heat-transfer fluids, while others are approved only for water; check the exact meter and calculator instructions. A laboratory display resolution of 0.1°C does not imply the installed probe pair can determine a 3 K difference to a few per cent.
Uncertainty budgeting: why small temperature differences are difficult
COP is a quotient, so errors in thermal and electrical measurements propagate into the result. A heat meter has contributions from the flow element, differential-temperature pair and calculator. An electricity meter has its own accuracy class, low-load behaviour and possible phase/voltage measurement limitations. Synchronisation, sensor placement and boundary errors can be more important than the nominal component specifications.
Consider two uncalibrated pipe probes each with a potential ±0.5°C absolute error, while true flow and return difference is just 3.0 K. If their errors oppose one another, the displayed difference could be 2.0–4.0 K: approximately −33% to +33% of the true ΔT in this illustrative worst-case exercise. This is not a statistical uncertainty claim or a statement about every DS18B20AliExpress price; it demonstrates why using two probes rated ±0.5°C does not automatically deliver a precise differential measurement. Under matched calibration their relative offset may be much smaller, but you must demonstrate that rather than assume it.
| Error source | Possible symptom | How to test | Priority |
|---|---|---|---|
| Flow probe placement | Slow or biased flow temperature | Compare OEM and external pair in steady conditions | High |
| Unmatched temperature pair | COP drifts with small ΔT | Compare probes at stable common temperature | High |
| Incorrect flow scaling | Constant ×60 or ×1000 error | Cross-check register units and instantaneous reading | Critical |
| Glycol properties ignored | Systematic thermal-power bias | Check installation fluid specification | Medium–high |
| Electric meter misses immersion | Apparent high COP during DHW reheating | Trace circuits and read meter at known loads | High |
| Electric power sensor at wrong phase | Input sometimes near zero | Verify power, phase count and CT orientation | Critical |
| Data timestamp skew | COP spikes at compressor transitions | Check sensor age, sampling and time alignment | High |
| Heat meter counts secondary circuit only | COP differs in buffer operation | Re-check schematic and metering boundaries | High |
If a correctly installed heat meter carries a declared class under a relevant standard, respect its rated flow and temperature-difference ranges. A device calibrated for its intended operating region may behave very differently at very low water flow or ΔT. Do not quote a blanket “1% COP accuracy” from one component’s data sheet. For domestic operational optimisation, a stable, repeatable metric with known limits is often more useful than false precision.
Choose electrical monitoring that includes the right equipment
Heat pumps may connect via a single-phase or three-phase supply. Some installations have distinct feeds for an immersion heater, an electric backup heater and plant-room circulation pumps. The builder or electrician may also have placed a dedicated meter where the distribution-board label says “heat pump”, even though the meter measures only the outdoor compressor or a sub-circuit. Inspect the electrical one-line diagram and confirm a realistic input reading against operating states before trusting its label.
| Electrical item | Include for unit-only? | Include for whole-system? | Verification |
|---|---|---|---|
| Compressor and inverter electronics | Normally yes | Yes | Dedicated unit supply or OEM input register |
| Outdoor fan | Normally yes | Yes | Typically inside unit electrical boundary |
| Internal control electronics | Normally yes if same unit supply | Yes | Confirm standby treatment |
| Internal circulation pump | If powered within defined unit boundary | Yes | Check service diagram |
| External primary/secondary pump | Usually excluded from unit-only | Usually yes | Separate supply or submeter |
| Electric resistance backup heater | Only if within stated unit boundary; document it | Yes for system metric | Check element supply and operating mode |
| Cylinder immersion heater | No, unless intentionally included in wider metric | Yes if included in DHW system boundary | Dedicated feed and thermostat protection |
| Other household loads | No | No | Keep main grid meter out of unit denominator |
The distinction matters especially when solar PV supplies some of the heat pump electricity. The input to COP is electrical consumption by the heat pump, regardless of whether those electrons originated from solar or the grid. Substituting “grid import while compressor runs” for compressor input can generate very high or infinite COP on a sunny day. Electricity price and grid carbon intensity are separate valuable metrics; they do not replace physical energy input.
OpenEnergyMonitor’s EmonTx4 heat-pump monitor documentation describes measuring the heat pump, immersion/backup heaters and circulation pumps separately. Such separation supports both accurate total energy and diagnostics: it helps you identify a surprise element heater rather than blaming the compressor for a transient increase in power.
Synchronise measurements before calculating instantaneous COP
An instantaneous ratio is unreliable when one sensor updates every five seconds while the other updates only every sixty seconds. Suppose electrical power jumps from 0.2 kW to 2.0 kW at compressor start but the displayed heat output still reflects the preceding off-period. One update later, the inverse may happen. A dashboard can display COP values below one or above ten even when both instruments are individually healthy.
Use measured energy totals over sufficiently long windows as the primary performance measure. If instantaneous COP is useful for control-system diagnosis, require operating-state confirmation, minimum electrical input, valid water flow, and reasonably recent timestamps on both channels. Smooth charts modestly for readability, but preserve raw traces for fault investigation. Do not “fix” implausible readings by replacing unavailable values with last-known readings without flagging the time gap.
| Time window | Best use | Data quality consideration |
|---|---|---|
| Seconds | Compressor ramps, valve operation | Clock skew and thermal lag dominate |
| 5–15 minutes | Stable-state analysis | Avoid start-up and defrost when judging steady efficiency |
| Hour | Cycle and weather relationships | Include full starts and operating modes |
| Day | Tariff, weather and DHW comparison | Use energy deltas, not average of COP readings |
| Week/month | Performance trends and seasonal change | Account for different hot-water demand and outdoor climate |
| Heating season/year | Whole-system seasonal performance | Meter resets, missing readings and boundary consistency matter |
It is sometimes useful to keep a stable heating operating COP view and a separate whole-day total energy ratio. These answer different questions. A heat pump may run at COP 4.0 in a stable space-heating period, yet its whole-day ratio may be lower if the period includes hot-water charging, defrost and standby consumption. This is not proof of a fault.
A Home Assistant data model that remains auditable
Start by identifying immutable source entities: heat meter cumulative delivered-energy kWh, dedicated electricity meter cumulative consumed-energy kWh, heating operation mode, compressor state, outside temperature and optional DHW valve state. Where possible, choose cumulative monotonic meters rather than relying only on a stream of instantaneous power. Keep the raw entities visible in a diagnostic dashboard so an attractive derived “daily COP” figure does not hide broken measurements.
- Raw:
sensor.hp_heat_energy_totalandsensor.hp_electricity_energy_total, from actual meter integrations, each using kWh and the appropriate energy statistics class. - Operating state: an OEM-defined state such as heating, DHW, cooling, defrost, standby or unavailable; do not infer every state solely from outlet temperature.
- Daily totals: Home Assistant Utility Meter helpers, retaining exact source boundaries.
- Derived ratio: calculate only when both totals are valid and electrical usage exceeds a practical minimum.
- Integrity: show last update, long-term statistics warnings, manual meter checks and days excluded due to invalid data.
Home Assistant’s Utility Meter helper creates period counters from cumulative energy sources. It is a reasonable building block for daily measurements, but it does not make a poor source accurate. If a heat meter resets or jumps backwards, examine the integration’s documented reset behaviour and Home Assistant statistics rather than automatically negating the difference.
# Illustrative configuration.yaml, using EXISTING measured cumulative sensors.
# Verify entity IDs and source units before enabling.
utility_meter:
hp_measured_heat_daily:
source: sensor.hp_heat_energy_total
cycle: daily
hp_measured_electricity_daily:
source: sensor.hp_electricity_energy_total
cycle: daily
hp_measured_heat_monthly:
source: sensor.hp_heat_energy_total
cycle: monthly
hp_measured_electricity_monthly:
source: sensor.hp_electricity_energy_total
cycle: monthly
template:
- sensor:
- name: Heat pump measured daily COP
unique_id: heat_pump_measured_daily_cop
state_class: measurement
availability: >
{{ is_number(states('sensor.hp_measured_heat_daily'))
and is_number(states('sensor.hp_measured_electricity_daily'))
and states('sensor.hp_measured_electricity_daily') | float(0) > 0.2 }}
state: >
{{ (states('sensor.hp_measured_heat_daily') | float /
states('sensor.hp_measured_electricity_daily') | float) | round(2) }}
- name: Heat pump measured monthly COP
unique_id: heat_pump_measured_monthly_cop
state_class: measurement
availability: >
{{ is_number(states('sensor.hp_measured_heat_monthly'))
and is_number(states('sensor.hp_measured_electricity_monthly'))
and states('sensor.hp_measured_electricity_monthly') | float(0) > 2 }}
state: >
{{ (states('sensor.hp_measured_heat_monthly') | float /
states('sensor.hp_measured_electricity_monthly') | float) | round(2) }}
The 0.2 kWh daily and 2 kWh monthly input thresholds are deliberately illustrative. They suppress extreme ratios at the start of a period when the denominator is tiny; they are not industry standards and may be inappropriate for a small installation or low-use month. Match thresholds to measurement resolution and expected consumption. Both sensors deliberately have state_class: measurement because COP is a dimensionless ratio, not a continuously increasing energy total. Do not assign device_class: energy to COP.
A daily Utility Meter helper is a counter for the current day; it resets each midnight. Accordingly, the “daily COP” sensor above is the day-to-date ratio and can change substantially in the morning or immediately after reset. A completed-day reporting workflow should store the finished day’s heat and electricity totals before resetting, or query aligned historical statistics, rather than assuming the value at 00:01 is yesterday’s result. If statistics integration or retention policy changes, test the behaviour again.
If you only have power readings: integrate, but know what that means
Some integrations expose only heat-output kW and electrical-input W, with no reliable cumulative kWh values. Home Assistant’s Integral integration can integrate power into energy. A reasonable configuration follows, but only if the power reading itself is a valid measurement and updates frequently enough. The integration’s choice of numerical method can influence results during sharp steps; check the source’s update behaviour and the official documentation.
# Only if these POWER entities exist and their physical units are correct.
# sensor.hp_electric_power_w is watts; sensor.hp_thermal_power_kw is kW.
sensor:
- platform: integration
source: sensor.hp_electric_power_w
name: HP measured electrical energy
unique_id: hp_measured_electric_energy_from_power
unit_prefix: k
unit_time: h
method: left
max_sub_interval:
minutes: 5
- platform: integration
source: sensor.hp_thermal_power_kw
name: HP thermal energy from power
unique_id: hp_thermal_energy_from_power
unit_time: h
method: left
max_sub_interval:
minutes: 5
The resulting integrated sensors need to be checked for real kWh units and correct long-term statistics before feeding the Utility Meter helpers. If the thermal-power entity was itself derived from a nominal rather than measured water flow, integrating it produces estimated heat energy, not true measured heat energy. At a sudden step change, a left-hand sum can be useful for readings that hold their previous value until an update; a trapezoidal method can perform differently. Select a method based on the actual reporting semantics. The official Home Assistant documentation is the reference for supported configuration and behaviour.
If a manufacturer already publishes cumulative heat and electricity kWh totals, avoid reconstructing them from rough instantaneous data without good reason. Also, never combine a cumulative kWh entity and a separate integral of the same power as if they were two different loads: that double counts energy.
Comparing daily, seasonal and manufacturer-published results correctly
Seasonal performance is an energy-weighted ratio: Σ delivered heat (kWh) ÷ Σ electrical input (kWh). It is not an arithmetic average of daily, weekly or instantaneous COP values unless every observation happens to carry an identical electrical-energy weight. Seasonal results should use a stated period—such as September to May or a calendar year—and a stable metering boundary. The acronym SCOP is also used for performance under standardised product-rating procedures; an installation’s measured seasonal ratio should not automatically be labelled the certified product SCOP.
| Period | Heat delivered | Electricity input | COP |
|---|---|---|---|
| Mild day | 48 kWh | 12 kWh | 4.00 |
| Cold day with DHW and defrost | 54 kWh | 22 kWh | 2.45 |
| Total of both days | 102 kWh | 34 kWh | 3.00 |
Averaging the two daily COP figures gives (4.00 + 2.45) / 2 = 3.225, which overstates the combined performance. The combined 3.00 is correct for this defined example because it uses the actual energy totals. For seasonal analysis, maintain a table of daily measured heat and electricity, flag missing records, and make the sum of accepted energies the primary calculation.
A manufacturer’s published COP at a declared air and water temperature combination is a useful benchmark, but not a promise that the whole domestic installation will achieve the same value. Outdoor air humidity, cycling frequency, control strategy, water set point, underfloor versus radiator temperatures, defrost frequency, DHW schedules and auxiliary equipment change the observed result. Compare like with like: do not interpret a winter-month system ratio as a direct test of a laboratory operating-point claim.
Defrost, cooling and heat-flow sign conventions
Air-source heat pumps periodically defrost their outdoor coil. Some reverse the refrigeration cycle, temporarily transferring heat from the water circuit towards the outdoor unit. A heat meter on the water side may legitimately register negative instantaneous heat flow depending on its measurement capability and register definitions. Some controllers expose separate positive and negative energy totals; others report net thermal energy or discard reverse flow. Investigate the instrument’s documented method rather than assuming every meter responds identically.
| Observed behaviour | Possible interpretation | How it affects COP |
|---|---|---|
| Temporary negative water-side thermal power | Reverse-cycle defrost or cooling | Net delivered heat may decrease during that interval |
| Thermal power falls but electrical power remains | Compressor transition or defrost event | Instantaneous ratio may become small or negative |
| Reported heat total only rises | Meter may accumulate only positive thermal energy | May overstate net delivered heat if reverse flow is ignored |
| Compressor off; circulation pump on | Standby or water circulation | Electricity still matters for declared seasonal boundary |
| DHW charge period at higher outlet temperature | Cylinder heating instead of low-temperature space heating | Operating COP often changes |
| Backup heater active | Resistance element provides useful heat at roughly one-to-one electricity-to-heat conversion | Aggregate ratio changes; count both sides |
For example, a five-minute defrost period extracts 0.35 kWh from the heating water while consuming 0.25 kWh of electricity. If the chosen heat boundary measures net energy transfer, that −0.35 kWh belongs in the energy accounting. Merely clipping all negative thermal-power values to zero would inflate the net delivered heat figure. But if the installed heat meter separately tracks forward and reverse heat in distinct registers, use those semantics instead. A smart-dashboard smoothing filter is not a replacement for the meter’s physical energy bookkeeping.
A reader who wants to diagnose defrost frequency should keep a separate event view using the native heat-pump state if available, together with outdoor temperature, humidity, flow, return and input power. Do not infer refrigerant faults from a few unusual points. Our flow/return sensor guide discusses measurement placement, while the specialist defrost article can provide the detailed event interpretation once it is published.
A commissioning routine that catches the largest errors early
Before relying on COP for a buying decision, warranty discussion or controls change, give the measurement system a short commissioning exercise. The aim is not to make Home Assistant control a safety-critical heat pump function. It is to confirm that the charts reflect the equipment actually fitted. A reasonably technical homeowner can perform non-invasive data checks; meter wiring, electrical cabinet work, hydraulic alterations and manufacturer-service functions belong with competent professionals.
- 1. Draw the metering boundary. Mark compressor feed, electric backup supply, external pumps, diverter valve, heat meter, flow meter and buffer. Photograph the actual meter serial numbers.
- 2. Confirm correct direction and scaling. Compare water flow and electricity totals against the physical meter displays; account for pulse constants and register multipliers.
- 3. Verify units. Check W versus kW, litres per minute versus cubic metres per hour, °C difference versus kelvin and Wh versus kWh.
- 4. Review operating states. Capture a steady heating run, compressor start/stop, DHW charge and—when naturally occurring—a defrost event.
- 5. Inspect timestamp quality. Record how often each value updates and how Home Assistant handles missing source data.
- 6. Check statistics. Confirm cumulative energy entities have appropriate metadata and no unexplained resets or recorded spikes.
- 7. Repeat manually. Read the electricity and heat-meter counters at the start and end of a known test window. Calculate the ratio without relying on the dashboard.
- 8. Document exclusions. State whether external pumps, immersion heaters, cylinder losses and standby electricity are included.
- 9. Preserve a baseline. Save a week of weather and performance after installation, so later seasonal comparisons are meaningful.
A simple sanity-check window illustrates the process. Suppose the physical heat meter moves from 2,457.6 to 2,473.3 kWh, and the dedicated electric meter moves from 812.8 to 817.9 kWh. Then Δheat = 15.7 kWh, Δelectricity = 5.1 kWh and COP = 3.08. Your Home Assistant readings for those same timestamps should agree within the plausible meter and sampling tolerances. If Home Assistant reports 31.4 kWh of heat, look for a factor-two scale error or duplicate source; do not conclude that the heat pump is extraordinarily efficient.
Build a diagnostic dashboard before adding automated alerts
A robust dashboard should let you spot the difference between a poor performing heat pump and a poorly performing measurement chain. Put source reliability beside performance: valid last-update times, outdoor temperature, flow temperature, return temperature, measured water flow, operating mode, thermal kW, electrical kW, cumulative heat kWh and cumulative electricity kWh. Keep the COP ratio prominent but subordinate to those inputs.
| Dashboard panel | Recommended entities | What it explains |
|---|---|---|
| Energy totals | Heat kWh and electricity kWh cumulative and daily | True numerator/denominator |
| Operating state | Heating, DHW, defrost, idle, unavailable | Why COP changes |
| Hydraulic panel | Flow, return, ΔT, water flow | Heat-meter plausibility |
| Electrical panel | Unit input kW, backup/immersion kW, pumps | Hidden consumption |
| Weather / set point | Outdoor temperature, flow target, indoor temperature | Expected performance variations |
| Data quality | Age of updates, source availability, reset markers | Spurious ratio prevention |
Useful quality alerts include “heat meter unavailable while compressor is active”, “electricity cumulative total moved backwards unexpectedly”, “thermal power is nonzero while water-flow sensor is invalid”, and “daily denominator remains near zero despite multiple hours of compressor operation”. These are more actionable than a hard rule declaring any COP below three a fault. Low COP for a short interval may be normal during DHW heating, very cold weather or defrost; the installer should evaluate persistent patterns in context.
Cost, hardware selection and what is worth buying
The minimum sensible equipment depends on the question. If you want to know whether the heat pump is using more electricity this winter than last, a dedicated electrical energy meter and outdoor-temperature record may be sufficient. If you want to assess true water-side thermal efficiency, you need verified heat-energy output. An ESP32 with two temperature sensors is a valuable diagnostic accessory but does not become a heat meter without a reliable fluid-flow measurement, suitable calibration and clear hydraulic boundary.
| Goal | Minimum equipment | Common unnecessary purchase |
|---|---|---|
| Understand electricity use | Dedicated suitable electricity meter or reliable OEM kWh total | Full thermal-meter retrofit for a simple consumption chart |
| Find heating cycles and peaks | Electrical power trace plus heat-pump state | Extra cloud bridge if local telemetry already works |
| Analyse pipe-temperature trends | Correctly placed paired probes or OEM sensors | More probes without a pipework diagram |
| Estimate operational COP | Verified actual water flow, ΔT and electric input | Assuming fixed circulating-pump flow |
| Measure seasonal COP credibly | Appropriate heat meter and dedicated electricity measurement | Uncalibrated DIY probes presented as billing-grade |
| Measure whole-system performance | Boundary-complete heat and electricity metering | Incompatible single-circuit meters used for entire plant |
When comparing heat meters, check the permitted medium and glycol content, flow range, pipe size, pressure rating, installation straight-run requirements, temperature sensor pair, calculator and M-Bus or pulse output. Note that M-Bus is not Modbus; gateways exist but protocols and electrical interfaces are different. For electricity meters, check phases, rated current, approved location, pulse or Modbus output and whether the device exposes cumulative imported kWh. A generic “smart energy sensor” listing is not sufficient evidence that a model will suit the installation.
A well chosen meter may have a higher initial price but saves analysis time because physical values have a traceable meaning. Conversely, purchasing elaborate sensor hardware before identifying the water circuit can leave you with precision-looking graphs that cannot answer the original efficiency question.
Three worked investigations from realistic Home Assistant patterns
Case 1: the winter COP is much worse than October
An installation reports daily ratios around 4.2 in mild October weather and around 2.7 in January. The outdoor temperature is lower, supply-water temperature is higher, and defrost is more frequent. Before declaring a fault, split heating and DHW consumption if the metering permits, inspect outdoor-weather and flow-temperature relationships, and check whether a resistance element has begun running. Compare conditions across matching temperature ranges, not simply calendar averages. An unexpected trend at similar weather and set points deserves installer attention; a temperature-related drop by itself does not identify a hardware problem.
Case 2: the dashboard reports COP above 12 after a solar installation
The chart uses grid import as the electrical denominator. At noon, photovoltaic production supplies much of the house demand, so net import approaches zero even though the compressor is still drawing electricity. The calculation explodes as the denominator falls. Correct by using a dedicated heat-pump electricity-consumption meter or a verified unit-consumption register. Grid import remains useful for operating cost, but should be shown on a separate chart. This is a conceptual boundary error, not a surprising new thermodynamic capability.
Case 3: recorded COP becomes negative during defrost
The flow meter remains active, the return temperature briefly exceeds supply, and the controller indicates defrost. A signed instantaneous thermal-power value may genuinely be negative at the chosen water boundary. Check whether the heat meter’s energy register tracks reverse heat, net heat or only positive delivered heat. For whole-period performance, consistently account for that physical transfer according to the documented meter method; for a user-friendly stable-heating COP card, exclude defrost intervals but label that filtered view clearly. Both displays can coexist as long as they do not pretend to measure the same quantity.
Documentation for standards, sensors and Home Assistant implementation
- OpenEnergyMonitor: heat-pump monitoring levels — electricity, temperature and true heat metering.
- OpenEnergyMonitor EmonTx4 heat-pump monitor — multiple electrical loads, sensors and recommended higher accuracy meters.
- OpenEnergyMonitor heat-pump fundamentals — the heat-flow and COP equations.
- Home Assistant Utility Meter — counters and reporting cycles.
- Home Assistant Integral — converting power measurements into energy using numerical integration.
- Home Assistant Template — numeric checks and derived COP sensors.
- Home Assistant Energy FAQ — energy class, state class and statistics requirements.
- Home Assistant individual-device energy — meter hierarchy and device-level power/energy.
- Home Assistant Modbus — model-specific register integration; not interchangeable with M-Bus.
- ESP32.co.uk: temperature sensors — accurate sensor placement and interpretation.
- ESP32.co.uk: energy entity accuracy — input readings and statistics.
Related guides and official documentation
- Heat pump flow and return temperature sensors — probe accuracy, location and ΔT.
- Heat pump monitoring: native integration versus external meter — choosing a power measurement boundary.
- Home Assistant Energy Dashboard: correct energy entities — cumulative energy data principles.
- Verify Home Assistant energy data against your utility bill — checking electrical readings.
- Home Assistant Utility Meter integration — energy period counters.
- Home Assistant Template integration — calculated sensors.
- Home Assistant Modbus integration — documented device registers.
- Home Assistant Energy FAQ — energy sensor metadata and troubleshooting.
Final recommendation
Build your COP calculation around two credible cumulative energy totals, not a clever formula applied to unreliable sensors. A well-defined metering boundary, correct heat-meter installation and matching electricity measurement will produce a useful daily and seasonal picture. Home Assistant is excellent at storing, visualising and comparing that evidence, provided it does not silently replace missing readings with guesses.