Heat Pump COP in Home Assistant: Electricity, Heat Output and Common Errors7

Calculate heat pump COP in Home Assistant using matched heat and electricity energy meters. Avoid common errors with flow, defrost, DHW and averaging.

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 meterAliExpress 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 meterAliExpress price 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.

MetricCalculationBest useCommon trap
Instantaneous COPThermal power (kW) / electrical power (kW)Steady-state diagnosticsDividing asynchronous or near-zero readings
Daily COPDaily delivered thermal kWh / daily input kWhDaily monitoringMismatched midnight boundaries
Monthly COPMonthly heat kWh / monthly input kWhWeather and operation comparisonsAveraging daily ratios without weighting
Seasonal SPFSeasonal delivered heat / seasonal electrical inputWhole-season evaluationComparing unlike system boundaries
Manufacturer SCOPStandardised seasonal test methodologyProduct comparison under stated conditionsTreating 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.

BoundaryHeat numeratorElectricity denominatorInterpretation
Appliance-onlyThermal energy leaving applianceAppliance electrical feedAppliance performance, depending on included auxiliaries
Heat-pump systemThermal energy from heat pump to systemCompressor, controls and relevant pumpsSystem-level efficiency
Space-heating deliveryHeat delivered to emitter circuitAll electricity used to provide that heatBuilding heating performance; buffer losses matter
Space heating plus DHWHeat supplied to both servicesElectrical input for both servicesMixed operating performance; DHW usually lowers ratio
With electric backupHeat includes backup heater contributionElectricity includes backup heaterReal total efficiency; can approach 1 during resistive-only operation

What hardware is required?

For the heat side, a calibrated thermal-energy meterAliExpress price 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 meterAliExpress price 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.

DeviceEssential measurementIntegration optionsWatch out for
Calibrated heat meterFlow, temperature pair, thermal kWhModbus, M-Bus gateway, pulse, nativeFluid type, placement, update interval
Electricity energy meterAliExpress priceReal electrical kWhModbus, local API, pulseCircuit boundary, phase mapping
Native heat-pump integrationVendor-reported heat and power/energyDocumented local API or gatewayEstimates, missing auxiliaries, delayed updates
Surface temperature probesPipe temperature trendsESPHome, low-voltage gatewayCannot give heat kWh without flow
Home AssistantHistory, aggregation, dashboardsEnergy and utility-meter helpersUnits, 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.

PeriodHeat deliveredElectricity consumedRatio
Hour A6 kWh2 kWh3.00
Hour B1 kWh1 kWh1.00
Combined7 kWh3 kWh2.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 cardEntitiesWhy it matters
Daily energy totalsThermal kWh, electrical kWhShows the evidence for COP
Daily COPHeat divided by electricityQuick trend, provisional during day
Operating stateHeating, DHW, defrost, idleExplains transient changes
Water temperaturesFlow, return, outside airDiagnoses water-temperature penalty
Backup heatAuxiliary heater runtime/energyExplains low system COP
Data qualityLast update, unavailable sensorsPrevents false confidence

Ten common COP errors—and how to recognise them

ErrorTypical symptomCorrection
Dividing temperatures rather than thermal powerCOP changes with pipe temperature but not flowUse measured heat energy and electrical energy
Assumed fixed pump flowCOP unexpectedly stable or optimisticMeasure actual flow or use calibrated heat meter
Wrong electrical circuitImplausibly high COPInclude relevant compressor and auxiliary loads
Mixed heat/electric boundariesPoor agreement with billsAlign space heating, DHW and backup scopes
Averaging instantaneous COPSeasonal result differs from total kWh ratioSum heat and electricity first
Power/energy unit confusionCOP 1,000 times too high/lowCheck W/kW and Wh/kWh
Stale data or mismatched pollingSpikes during compressor transitionsAlign time windows and flag stale values
Defrost misclassificationNegative or odd short-term COPAnalyse full periods including defrost
Meter resets or pulse lossesSudden impossible energy changesCheck counter persistence and statistics
Glycol or sensor offsetSystematic thermal-power errorUse 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.

Related guides and official documentation

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.

CONTINUE EXPLORING / SMART HOME & ESPHOME

Read next

Practical guides related to this article.

Explore the topic →
HARDWARE DECISION GUIDEChoosing Home Assistant hardware?

Compare practical options before you choose hardware.

Compare options →