Skip to content

feat: expose power consumption for heating, dhw and total#667

Merged
CFenner merged 25 commits intoopenviess:masterfrom
tlinnet:core_issue_155695
Feb 18, 2026
Merged

feat: expose power consumption for heating, dhw and total#667
CFenner merged 25 commits intoopenviess:masterfrom
tlinnet:core_issue_155695

Conversation

@tlinnet
Copy link
Contributor

@tlinnet tlinnet commented Nov 20, 2025

tlinnet and others added 4 commits November 21, 2025 07:42
def getPowerConsumptionHeatingYear(self):
    def getPowerConsumptionHeatingThisYear(self):

Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
…wattHour, that can be stored in either properties.day.unit or properties.unit.value
@tlinnet
Copy link
Contributor Author

tlinnet commented Nov 21, 2025

There was one thing I was unsure abouat

grep " def " PyViCareHeatPump.py | cut -d" " -f6 | cut -d"(" -f1 | sort | uniq -d shows that some function definitions are made multiple times

getLiquidTemperature
getLiquidTemperatureUnit
getPowerConsumptionCoolingThisYear
getPowerConsumptionHeatingThisYear

Not sure if this could be an issue.
Test cases are running as expected

@tlinnet
Copy link
Contributor Author

tlinnet commented Nov 22, 2025

Merge from upstream

…st_Vitodens200W, test_Vitodens200W_B2HF, test_Vitodens222W, test_Vitodens300W
@tlinnet
Copy link
Contributor Author

tlinnet commented Nov 28, 2025

Hi @CFenner .
What would be needed to move this forward?

@tlinnet
Copy link
Contributor Author

tlinnet commented Dec 1, 2025

Hi @CFenner

I tested the PR, by setting up vicare in homeassistant/custom_components, and adding the new sensors.
This seems now to work as expected

image

@tlinnet
Copy link
Contributor Author

tlinnet commented Dec 3, 2025

Lets go :)
It's working as intended

@tlinnet
Copy link
Contributor Author

tlinnet commented Dec 7, 2025

Anyone here?

@lackas
Copy link
Contributor

lackas commented Jan 22, 2026

Hi @tlinnet, just a heads up that there are related power consumption efforts happening:

All add power consumption and sensor features for heat pumps - complementary work with no conflicts. Mentioning in case you or the maintainers want to coordinate the reviews.

@tlinnet
Copy link
Contributor Author

tlinnet commented Feb 6, 2026

Hi @CFenner
Can this be merged ?

@tlinnet
Copy link
Contributor Author

tlinnet commented Feb 18, 2026

Hi @lackas and @CFenner
Cab we complete this PR before it turns into dust?

Copy link
Member

@CFenner CFenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CFenner CFenner changed the title Add sensors for heating.power.consumption dhw+heating+total feat: Add sensors for heating.power.consumption dhw+heating+total Feb 18, 2026
@CFenner CFenner changed the title feat: Add sensors for heating.power.consumption dhw+heating+total feat: add sensors for heating.power.consumption dhw+heating+total Feb 18, 2026
@CFenner CFenner changed the title feat: add sensors for heating.power.consumption dhw+heating+total feat: expose power consumption for heating, dhw and total Feb 18, 2026
@CFenner CFenner merged commit 8f17bef into openviess:master Feb 18, 2026
8 checks passed
lackas added a commit to lackas/PyViCare that referenced this pull request Feb 18, 2026
- Revert HeatingRod component class back to direct methods on HeatPump
  (preserves existing getHeatingRod* API for backwards compatibility)
- Add return type hints to getPrimaryCircuitPumpRotation and getTargetTemperature
- Resolve merge conflicts from openviess#667 merge
CFenner added a commit that referenced this pull request Feb 18, 2026
… heating rod stats (#689)

* feat(heat pump): add COP, compressor sensors, refrigerant circuit and heating rod stats

Add comprehensive heat pump monitoring for Vitocal 300-G and similar devices:

HeatPump class:
- COP methods: getCoefficientOfPerformance{Heating,DHW,Total,Cooling,Green}
- Compressor: getPower, getModulation (with units)
- Refrigerant sensors: getHotGas/SuctionGas pressure and temperature, getLiquidGasTemperature
- Runtime: getMainECURuntime, getHeatingRodRuntimeLevel{One,Two}
- Configuration: buffer temp max, damping factor, heater approvals
- Heating rod power consumption summary (DHW and heating)

HeatingDevice class:
- Primary circuit pump: getPrimaryCircuitPumpRotation (with unit)

Compressor class:
- Load class methods now support fallback to statistics.load path
- Sensor methods: getInlet/Outlet/Overheat temperature, getInletPressure

New CoolingCircuit class:
- getType, getReverseActive

Closes #677

* Remove deprecated COP green and split out CoolingCircuit

- Remove getCoefficientOfPerformanceGreen (heating.cop.green is
  deprecated, replaced by heating.cop.photovoltaic)
- Move heating.cop.green to deprecated properties list
- Remove CoolingCircuit class (will be in separate PR)

* Refactor heating rod methods into HeatingRod component class

Extract all getHeatingRod* methods from HeatPump into a dedicated
HeatingRod class, consistent with Compressor/Condensor/Inverter.
Access via device.heatingRod.getStarts() etc.

* Address review: revert HeatingRod class, add missing types

- Revert HeatingRod component class back to direct methods on HeatPump
  (preserves existing getHeatingRod* API for backwards compatibility)
- Add return type hints to getPrimaryCircuitPumpRotation and getTargetTemperature
- Resolve merge conflicts from #667 merge

* Remove unnecessary blank lines in getTemperature method

---------

Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments