Use new enums in gogogate2 (#61515)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-12 15:27:20 +01:00 committed by GitHub
parent 997809c6c4
commit a691abaa50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 16 deletions

View file

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