Use new SensorDeviceClass in apcupsd (#61271)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
c0529ac1ce
commit
880a2b69b6
1 changed files with 2 additions and 2 deletions
|
@ -8,12 +8,12 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
SensorDeviceClass,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_RESOURCES,
|
CONF_RESOURCES,
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
|
||||||
ELECTRIC_CURRENT_AMPERE,
|
ELECTRIC_CURRENT_AMPERE,
|
||||||
ELECTRIC_POTENTIAL_VOLT,
|
ELECTRIC_POTENTIAL_VOLT,
|
||||||
FREQUENCY_HERTZ,
|
FREQUENCY_HERTZ,
|
||||||
|
@ -155,7 +155,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||||
key="itemp",
|
key="itemp",
|
||||||
name="Internal Temperature",
|
name="Internal Temperature",
|
||||||
native_unit_of_measurement=TEMP_CELSIUS,
|
native_unit_of_measurement=TEMP_CELSIUS,
|
||||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="lastxfer",
|
key="lastxfer",
|
||||||
|
|
Loading…
Add table
Reference in a new issue