mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Use CoverDeviceClass in homekit_controller (#69268)
This commit is contained in:
parent
18866e4e39
commit
67c95e92b1
@ -9,7 +9,6 @@ from aiohomekit.model.services import Service, ServicesTypes
|
|||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DEVICE_CLASS_GARAGE,
|
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_CLOSE_TILT,
|
SUPPORT_CLOSE_TILT,
|
||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
@ -17,6 +16,7 @@ from homeassistant.components.cover import (
|
|||||||
SUPPORT_SET_POSITION,
|
SUPPORT_SET_POSITION,
|
||||||
SUPPORT_SET_TILT_POSITION,
|
SUPPORT_SET_TILT_POSITION,
|
||||||
SUPPORT_STOP,
|
SUPPORT_STOP,
|
||||||
|
CoverDeviceClass,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -64,7 +64,7 @@ async def async_setup_entry(
|
|||||||
class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
|
class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
|
||||||
"""Representation of a HomeKit Garage Door."""
|
"""Representation of a HomeKit Garage Door."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_GARAGE
|
_attr_device_class = CoverDeviceClass.GARAGE
|
||||||
|
|
||||||
def get_characteristic_types(self) -> list[str]:
|
def get_characteristic_types(self) -> list[str]:
|
||||||
"""Define the homekit characteristics the entity cares about."""
|
"""Define the homekit characteristics the entity cares about."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user