Use EntityFeature enum in components (o**) (#69433)

This commit is contained in:
epenet 2022-04-07 15:15:05 +02:00 committed by GitHub
parent 3aeb53ec98
commit cac8d71764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 80 additions and 110 deletions

View file

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