Use new SensorDeviceClass in apcupsd (#61271)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-08 21:55:44 +01:00 committed by GitHub
parent c0529ac1ce
commit 880a2b69b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",