Use EntityFeature enum in components (o**) (#69433)
This commit is contained in:
parent
3aeb53ec98
commit
cac8d71764
7 changed files with 80 additions and 110 deletions
|
@ -2,10 +2,9 @@
|
|||
import logging
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
SUPPORT_CLOSE,
|
||||
SUPPORT_OPEN,
|
||||
CoverDeviceClass,
|
||||
CoverEntity,
|
||||
CoverEntityFeature,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import STATE_CLOSED, STATE_CLOSING, STATE_OPEN, STATE_OPENING
|
||||
|
@ -33,7 +32,7 @@ class OpenGarageCover(OpenGarageEntity, CoverEntity):
|
|||
"""Representation of a OpenGarage cover."""
|
||||
|
||||
_attr_device_class = CoverDeviceClass.GARAGE
|
||||
_attr_supported_features = SUPPORT_OPEN | SUPPORT_CLOSE
|
||||
_attr_supported_features = CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE
|
||||
|
||||
def __init__(self, open_garage_data_coordinator, device_id):
|
||||
"""Initialize the cover."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue