Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vicare volumetric flow and compressor phase sensors #103875

Merged
merged 9 commits into from
Nov 14, 2023
18 changes: 18 additions & 0 deletions homeassistant/components/vicare/sensor.py
Expand Up @@ -24,6 +24,7 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
PERCENTAGE,
EntityCategory,
UnitOfEnergy,
UnitOfPower,
UnitOfTemperature,
Expand Down Expand Up @@ -477,6 +478,15 @@ class ViCareSensorEntityDescription(SensorEntityDescription, ViCareRequiredKeysM
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
ViCareSensorEntityDescription(
key="volumetric_flow",
name="Volumetric flow",
icon="mdi:gauge",
native_unit_of_measurement="l/h",
edenhaus marked this conversation as resolved.
Show resolved Hide resolved
value_getter=lambda api: api.getVolumetricFlowReturn(),
fb22 marked this conversation as resolved.
Show resolved Hide resolved
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.MEASUREMENT,
),
)

CIRCUIT_SENSORS: tuple[ViCareSensorEntityDescription, ...] = (
Expand Down Expand Up @@ -572,6 +582,14 @@ class ViCareSensorEntityDescription(SensorEntityDescription, ViCareRequiredKeysM
value_getter=lambda api: api.getHoursLoadClass5(),
state_class=SensorStateClass.TOTAL_INCREASING,
),
ViCareSensorEntityDescription(
key="compressor_phase",
name="Compressor Phase",
icon="mdi:information",
value_getter=lambda api: api.getPhase(),
entity_category=EntityCategory.DIAGNOSTIC,
device_class=SensorDeviceClass.ENUM,
fb22 marked this conversation as resolved.
Show resolved Hide resolved
),
)


Expand Down