From d79169ca2e538c10eb1086101eafea1d6623d3ab Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 8 Dec 2021 19:57:18 +0100 Subject: [PATCH] Use new DeviceClass enums in acmeda (#61248) Co-authored-by: epenet --- homeassistant/components/acmeda/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/acmeda/sensor.py b/homeassistant/components/acmeda/sensor.py index 43f5e32c74f..57e5b50bd1f 100644 --- a/homeassistant/components/acmeda/sensor.py +++ b/homeassistant/components/acmeda/sensor.py @@ -1,6 +1,6 @@ """Support for Acmeda Roller Blind Batteries.""" -from homeassistant.components.sensor import SensorEntity -from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE +from homeassistant.components.sensor import SensorDeviceClass, SensorEntity +from homeassistant.const import PERCENTAGE from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -33,7 +33,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): class AcmedaBattery(AcmedaBase, SensorEntity): """Representation of a Acmeda cover device.""" - device_class = DEVICE_CLASS_BATTERY + device_class = SensorDeviceClass.BATTERY _attr_native_unit_of_measurement = PERCENTAGE @property