Use new enums in gogogate2 (#61515)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
997809c6c4
commit
a691abaa50
2 changed files with 14 additions and 16 deletions
|
@ -9,10 +9,9 @@ from ismartgate.common import (
|
|||
)
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
DEVICE_CLASS_GARAGE,
|
||||
DEVICE_CLASS_GATE,
|
||||
SUPPORT_CLOSE,
|
||||
SUPPORT_OPEN,
|
||||
CoverDeviceClass,
|
||||
CoverEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -57,7 +56,7 @@ class DeviceCover(GoGoGate2Entity, CoverEntity):
|
|||
super().__init__(config_entry, data_update_coordinator, door, unique_id)
|
||||
self._attr_supported_features = SUPPORT_OPEN | SUPPORT_CLOSE
|
||||
self._attr_device_class = (
|
||||
DEVICE_CLASS_GATE if self.door.gate else DEVICE_CLASS_GARAGE
|
||||
CoverDeviceClass.GATE if self.door.gate else CoverDeviceClass.GARAGE
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue