Fix incorrect device class in nibe heatpump (#84047)

This commit is contained in:
epenet 2022-12-15 14:23:06 +01:00 committed by GitHub
parent 0184aadb09
commit c4a01cf8d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,13 +12,12 @@ from homeassistant.components.sensor import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ELECTRIC_POTENTIAL_MILLIVOLT,
ELECTRIC_POTENTIAL_VOLT,
TIME_HOURS,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfEnergy,
UnitOfPower,
UnitOfTemperature,
UnitOfTime,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import EntityCategory
@ -58,16 +57,16 @@ UNIT_DESCRIPTIONS = {
"V": SensorEntityDescription(
key="V",
entity_category=EntityCategory.DIAGNOSTIC,
device_class=SensorDeviceClass.CURRENT,
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=ELECTRIC_POTENTIAL_VOLT,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
),
"mV": SensorEntityDescription(
key="mV",
entity_category=EntityCategory.DIAGNOSTIC,
device_class=SensorDeviceClass.CURRENT,
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=ELECTRIC_POTENTIAL_MILLIVOLT,
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
),
"W": SensorEntityDescription(
key="W",
@ -109,7 +108,7 @@ UNIT_DESCRIPTIONS = {
entity_category=EntityCategory.DIAGNOSTIC,
device_class=SensorDeviceClass.DURATION,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=TIME_HOURS,
native_unit_of_measurement=UnitOfTime.HOURS,
),
}