mirror of
https://github.com/home-assistant/core.git
synced 2025-05-22 14:57:14 +00:00
Set device class for lutron_caseta cover (#42436)
Since only shades are supported by the current code always set to DEVICE_CLASS_SHADE
This commit is contained in:
parent
f4cebfbb7e
commit
9e3d9af8e9
@ -3,6 +3,7 @@ import logging
|
|||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
|
DEVICE_CLASS_SHADE,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
@ -52,6 +53,11 @@ class LutronCasetaCover(LutronCasetaDevice, CoverEntity):
|
|||||||
"""Return the current position of cover."""
|
"""Return the current position of cover."""
|
||||||
return self._device["current_state"]
|
return self._device["current_state"]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device_class(self):
|
||||||
|
"""Return the device class."""
|
||||||
|
return DEVICE_CLASS_SHADE
|
||||||
|
|
||||||
async def async_stop_cover(self, **kwargs):
|
async def async_stop_cover(self, **kwargs):
|
||||||
"""Top the cover."""
|
"""Top the cover."""
|
||||||
await self._smartbridge.stop_cover(self.device_id)
|
await self._smartbridge.stop_cover(self.device_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user