From c893ad80e4a7b056c05d5417128e67a9209cf4d7 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 8 Dec 2021 22:03:51 +0100 Subject: [PATCH] Use new SwitchDeviceClass in aten_pe (#61281) Co-authored-by: epenet --- homeassistant/components/aten_pe/switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/aten_pe/switch.py b/homeassistant/components/aten_pe/switch.py index 044c890fc65..afe77669458 100644 --- a/homeassistant/components/aten_pe/switch.py +++ b/homeassistant/components/aten_pe/switch.py @@ -6,8 +6,8 @@ from atenpdu import AtenPE, AtenPEError import voluptuous as vol from homeassistant.components.switch import ( - DEVICE_CLASS_OUTLET, PLATFORM_SCHEMA, + SwitchDeviceClass, SwitchEntity, ) from homeassistant.const import CONF_HOST, CONF_PORT, CONF_USERNAME @@ -67,7 +67,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= class AtenSwitch(SwitchEntity): """Represents an ATEN PE switch.""" - _attr_device_class = DEVICE_CLASS_OUTLET + _attr_device_class = SwitchDeviceClass.OUTLET def __init__(self, device, mac, outlet, name): """Initialize an ATEN PE switch."""