From 9e3d9af8e9dddcb1e74686d3b522b604740dc94c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 26 Oct 2020 20:43:04 -0500 Subject: [PATCH] Set device class for lutron_caseta cover (#42436) Since only shades are supported by the current code always set to DEVICE_CLASS_SHADE --- homeassistant/components/lutron_caseta/cover.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/lutron_caseta/cover.py b/homeassistant/components/lutron_caseta/cover.py index 5eabfcd16fe..8db97e3fd0c 100644 --- a/homeassistant/components/lutron_caseta/cover.py +++ b/homeassistant/components/lutron_caseta/cover.py @@ -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)