Skip to content

Expose device-level current electrical input power (heating.power.consumption.current) #837

Open

Description

@fubo08

A local Home Assistant extension implements a power sensor using the device-level feature heating.power.consumption.current:

feature = device.api.getProperty("heating.power.consumption.current")
value = float(feature["properties"]["value"]["value"])

Could PyViCare expose a named accessor and unit accessor for this feature, to support a native HA sensor?

In current PyViCareHeatPump.py, getPowerConsumptionCurrent() belongs to the compressor and reads heating.compressors.{self.compressor}.power.consumption.current. That is a different scope and should not be substituted for the device-level feature.

Suggested behaviour: return the numeric value and API unit; handle unsupported/not-ready features consistently; retain zero as a valid value. This describes electrical input power rather than thermal output or accumulated energy. The prototype uses HA power/measurement metadata and reuses the native coordinator instead of starting another polling loop.

The local source has been inspected, but this is a feature proposal, not a merge-ready library patch. No upstream test suite has been run. Actual household measurements and device identifiers are intentionally omitted; unit handling and supported feature fixtures still need validation.

Activity

  1. self-assigned this
    on Oct 5, 2026
  2. ronpfi commented on Oct 9, 2026

    @ronpfi

    +1 – I'd like to add a related use case with the same device-level (E3 / Vitocal) features.

    Setup: Viessmann Vitocal heat pump (E3), PyViCare 2.63.0, Home Assistant 2026.10. The ViCare integration currently exposes neither the current electrical power nor the current heat output, even though both are available in the features response.

    Features I'd like to see as named accessors (with unit accessor):

    Feature Property Example value
    heating.power.consumption.current value.value (unit kilowatt) 0.747 kW idle/low, ~3.0 kW at compressor start
    heating.heat.production.current value.value (unit kilowatt) 4.654 kW
    heating.heat.production.summary.heating currentDay, currentMonth, currentYear (unit kilowattHour) 18.4 kWh today
    heating.heat.production.summary.dhw currentDay, currentMonth, currentYear (unit kilowattHour) 0 kWh today

    Cross-check for heating.heat.production.current: with 1530 l/h volumetric flow and a 2.7 K spread (supply 35.8 °C / return 33.1 °C) I get ≈ 4.8 kW, which matches the reported 4.654 kW closely.

    Current workaround: reading the raw feature via device.api.getProperty("heating.power.consumption.current")["properties"]["value"]["value"]. That works, but needs either a custom component or a second poller. A separate poller costs extra API calls, which matters because the Basic plan is limited to 1450 calls per 24 h and the integration already polls once a minute.

    Suggestion: add e.g. getPowerConsumptionCurrent() / getPowerConsumptionCurrentUnit(), getHeatProductionCurrent() / getHeatProductionCurrentUnit() and the matching getHeatProductionSummary… accessors to PyViCareHeatPump, so the Home Assistant ViCare integration can expose them as native sensors without any additional API request (the values are already part of the cached fetch_all_features() response).

    Happy to test a branch or open a PR if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions