diff --git a/homeassistant/components/homematicip_cloud/cover.py b/homeassistant/components/homematicip_cloud/cover.py index 2d3e1ea518c..843f44510c1 100644 --- a/homeassistant/components/homematicip_cloud/cover.py +++ b/homeassistant/components/homematicip_cloud/cover.py @@ -15,6 +15,9 @@ from homematicip.base.enums import DoorCommand, DoorState from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, + DEVICE_CLASS_BLIND, + DEVICE_CLASS_GARAGE, + DEVICE_CLASS_SHUTTER, CoverEntity, ) from homeassistant.config_entries import ConfigEntry @@ -63,6 +66,11 @@ async def async_setup_entry( class HomematicipBlindModule(HomematicipGenericEntity, CoverEntity): """Representation of the HomematicIP blind module.""" + @property + def device_class(self) -> str: + """Return the class of the cover.""" + return DEVICE_CLASS_BLIND + @property def current_cover_position(self) -> int: """Return current position of cover.""" @@ -151,6 +159,11 @@ class HomematicipMultiCoverShutter(HomematicipGenericEntity, CoverEntity): hap, device, channel=channel, is_multi_channel=is_multi_channel ) + @property + def device_class(self) -> str: + """Return the class of the cover.""" + return DEVICE_CLASS_SHUTTER + @property def current_cover_position(self) -> int: """Return current position of cover.""" @@ -264,6 +277,11 @@ class HomematicipGarageDoorModule(HomematicipGenericEntity, CoverEntity): } return door_state_to_position.get(self._device.doorState) + @property + def device_class(self) -> str: + """Return the class of the cover.""" + return DEVICE_CLASS_GARAGE + @property def is_closed(self) -> bool | None: """Return if the cover is closed.""" @@ -290,6 +308,11 @@ class HomematicipCoverShutterGroup(HomematicipGenericEntity, CoverEntity): device.modelType = f"HmIP-{post}" super().__init__(hap, device, post, is_multi_channel=False) + @property + def device_class(self) -> str: + """Return the class of the cover.""" + return DEVICE_CLASS_SHUTTER + @property def current_cover_position(self) -> int: """Return current position of cover."""