Use CoverDeviceClass in homekit_controller (#69268)

This commit is contained in:
epenet 2022-04-04 18:16:50 +02:00 committed by GitHub
parent 18866e4e39
commit 67c95e92b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,6 @@ from aiohomekit.model.services import Service, ServicesTypes
from homeassistant.components.cover import (
ATTR_POSITION,
ATTR_TILT_POSITION,
DEVICE_CLASS_GARAGE,
SUPPORT_CLOSE,
SUPPORT_CLOSE_TILT,
SUPPORT_OPEN,
@ -17,6 +16,7 @@ from homeassistant.components.cover import (
SUPPORT_SET_POSITION,
SUPPORT_SET_TILT_POSITION,
SUPPORT_STOP,
CoverDeviceClass,
CoverEntity,
)
from homeassistant.config_entries import ConfigEntry
@ -64,7 +64,7 @@ async def async_setup_entry(
class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
"""Representation of a HomeKit Garage Door."""
_attr_device_class = DEVICE_CLASS_GARAGE
_attr_device_class = CoverDeviceClass.GARAGE
def get_characteristic_types(self) -> list[str]:
"""Define the homekit characteristics the entity cares about."""