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:
J. Nick Koston 2020-10-26 20:43:04 -05:00 committed by GitHub
parent f4cebfbb7e
commit 9e3d9af8e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import logging
from homeassistant.components.cover import (
ATTR_POSITION,
DEVICE_CLASS_SHADE,
DOMAIN,
SUPPORT_CLOSE,
SUPPORT_OPEN,
@ -52,6 +53,11 @@ class LutronCasetaCover(LutronCasetaDevice, CoverEntity):
"""Return the current position of cover."""
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):
"""Top the cover."""
await self._smartbridge.stop_cover(self.device_id)