A custom Lovelace card for Home Assistant that calculates and displays COP (Coefficient of Performance) and SCOP (Seasonal Coefficient of Performance) for heat pumps.
It uses Home Assistant's Long-Term Statistics to calculate efficiency over different periods (24h, 7 days, Month, Year) and supports auxiliary heaters, energy classes, and multiple categories (Heating, Cooling, DHW).
- Real-time Calculation: Calculates COP/SCOP dynamically from produced heat and consumed energy entities.
- Automatic Unit Normalization: Auto-detects
Wh,kWh, andMWhand converts everything internally tokWh. - Multiple Periods: Displays statistics for 24h, 7 days, Month (configurable days), and Year (configurable days).
- Auxiliary Heaters: Supports adding auxiliary heater consumption (e.g., electric back-up) to the calculation. Can handle cases where the aux heater is already included in the main sensor or separate.
- Manual Scale Overrides: Allows per-entity overrides when
unit_of_measurementis missing or non-standard. - Energy Classes: Visualizes efficiency classes (A+++ to G) based on custom thresholds or EU standards (ETA_s).
- Two Modes:
- Single: Detailed view with tiles for a specific category.
- Table: Overview of all categories (Heating, DHW, Cooling, Total) in a compact table.
- Visual Editor: Fully configurable via the Lovelace UI editor.
- Open HACS in Home Assistant.
- Go to Frontend.
- Click the menu (three dots) in the top right corner -> Custom repositories.
- Add the URL of this repository:
https://github.com/VitisEK/cop-scop-card. - Select category: Lovelace.
- Click Add and then install the card.
- Reload resources (or restart HA).
- Download
cop-scop-card.jsfrom the Releases page. - Upload the file to your Home Assistant
config/www/directory. - Add the resource in Settings -> Dashboards -> Three dots -> Resources:
- URL:
/local/cop-scop-card.js - Type:
JavaScript Module
- URL:
type: custom:cop-scop-card
title: Heat Pump - COP/SCOP
mode: single
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced
consumed_entity: sensor.hp_heat_consumedtype: custom:cop-scop-card
title: Heat Pump Overview
mode: table
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced
consumed_entity: sensor.hp_heat_consumed
- key: dhw
name: Hot Water
enabled: true
produced_entity: sensor.hp_dhw_produced
consumed_entity: sensor.hp_dhw_consumed
- key: cooling
name: Cooling
enabled: false
produced_entity: sensor.hp_cooling_produced
consumed_entity: sensor.hp_cooling_consumed
- key: total
name: Total
enabled: true
produced_entity: sensor.hp_total_produced
consumed_entity: sensor.hp_total_consumedtype: custom:cop-scop-card
title: Heat Pump + Aux
mode: single
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced
consumed_entity: sensor.hp_heat_consumed
aux_entity: sensor.aux_heater_energy
aux_included: falsetype: custom:cop-scop-card
title: Total Including Aux
mode: single
categories:
- key: total
name: Total
enabled: true
produced_entity: sensor.hp_total_produced
consumed_entity: sensor.hp_total_consumed
aux_entity: sensor.aux_heater_heating_energy
aux_entity2: sensor.aux_heater_dhw_energy
aux_included: falsetype: custom:cop-scop-card
title: EU Classes
mode: table
show_classes: true
class_mode: eu_space_heating
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced
consumed_entity: sensor.hp_heat_consumedtype: custom:cop-scop-card
title: Custom Classes
show_classes: true
class_mode: custom
custom_class_thresholds:
A+++: 4.7
A++: 4.2
A+: 3.6
A: 3.1
B: 2.6
C: 2.2
D: 1.9
E: 1.6
F: 1.3
G: 0.0
class_colors:
A+++: '#00c853'
A++: '#64dd17'
A+: '#cddc39'
A: '#ffeb3b'
B: '#ffc107'
C: '#ff9800'
D: '#ff5722'
E: '#f44336'
F: '#d32f2f'
G: '#9e9e9e'
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced
consumed_entity: sensor.hp_heat_consumedtype: custom:cop-scop-card
title: Custom Periods
month_days: 21
year_days: 300
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced
consumed_entity: sensor.hp_heat_consumedtype: custom:cop-scop-card
title: Mixed Units
mode: single
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.hp_heat_produced_wh
consumed_entity: sensor.hp_heat_consumed_kwh
produced_scale: 0.001 # Optional override to convert source value to kWhThe card supports the visual editor. Simply add the "COP/SCOP Card" to your dashboard and configure it via the UI.
type: custom:cop-scop-card
title: Heat Pump Stats
mode: single # 'single' or 'table'
refresh_minutes: 60
show_classes: true
class_mode: custom # 'custom', 'eu_space_heating', 'eu_space_heating_lowtemp'
categories:
- key: heating
name: Heating
enabled: true
produced_entity: sensor.heat_pump_heating_energy_produced
consumed_entity: sensor.heat_pump_heating_energy_consumed
produced_scale: 0.001 # Optional. Use when entity unit metadata is wrong/missing (for Wh -> kWh)
consumed_scale: 1 # Optional. Scale override applied before COP calculation
aux_entity: sensor.aux_heater_energy
aux_scale: 0.001 # Optional. Same logic for aux entities
aux_included: false # Set to true if consumed_entity already includes aux_entity
- key: dhw
name: Hot Water
enabled: true
produced_entity: sensor.heat_pump_dhw_energy_produced
consumed_entity: sensor.heat_pump_dhw_energy_consumed
- key: total
name: Total
enabled: true
consumed_entity: sensor.heat_pump_total_energy_consumed
aux_entity: sensor.aux_heater_heating_energy # e.g. aux for heating
aux_entity2: sensor.aux_heater_dhw_energy # e.g. aux for DHW
aux2_scale: 0.001 # Optional override for aux_entity2The card normalizes all energy values to kWh before computing COP/SCOP. Supported automatic units are Wh, kWh, and MWh. If an entity exposes a different or missing unit_of_measurement, you can set produced_scale, consumed_scale, aux_scale, or aux2_scale manually.
- Added automatic normalization of
Wh,kWh, andMWhtokWh. - Added manual per-entity scale overrides:
produced_scale,consumed_scale,aux_scale,aux2_scale. - Added warning when an entity uses an unsupported unit without a manual override.
- Updated documentation with mixed-unit examples.
- Added
aux_includedtoggle for more accurate COP calculation when auxiliary heating is already part of the main consumption sensor. - Improved caching and editor behavior.
If you run into issues or have a feature request, please open an issue here: https://github.com/VitisEK/cop-scop-card/issues

