Fix incorrect device class in nibe heatpump (#84047)
This commit is contained in:
parent
0184aadb09
commit
c4a01cf8d2
1 changed files with 7 additions and 8 deletions
|
@ -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,
|
||||
),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue