Use new SwitchDeviceClass in aten_pe (#61281)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/61231/head
epenet 2021-12-08 22:03:51 +01:00 committed by GitHub
parent fd7328ce23
commit c893ad80e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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