Use new enums in smarthab (#62208)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-19 13:04:52 +01:00 committed by GitHub
parent 779ce6216c
commit b0cfc76add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,10 +7,10 @@ from requests.exceptions import Timeout
from homeassistant.components.cover import ( from homeassistant.components.cover import (
ATTR_POSITION, ATTR_POSITION,
DEVICE_CLASS_WINDOW,
SUPPORT_CLOSE, SUPPORT_CLOSE,
SUPPORT_OPEN, SUPPORT_OPEN,
SUPPORT_SET_POSITION, SUPPORT_SET_POSITION,
CoverDeviceClass,
CoverEntity, CoverEntity,
) )
@ -37,7 +37,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
class SmartHabCover(CoverEntity): class SmartHabCover(CoverEntity):
"""Representation a cover.""" """Representation a cover."""
_attr_device_class = DEVICE_CLASS_WINDOW _attr_device_class = CoverDeviceClass.WINDOW
def __init__(self, cover): def __init__(self, cover):
"""Initialize a SmartHabCover.""" """Initialize a SmartHabCover."""