diff --git a/homeassistant/components/cover/lutron_caseta.py b/homeassistant/components/cover/lutron_caseta.py index 6857aaebf9b..648dba98ca6 100644 --- a/homeassistant/components/cover/lutron_caseta.py +++ b/homeassistant/components/cover/lutron_caseta.py @@ -8,11 +8,10 @@ import logging from homeassistant.components.cover import ( - CoverDevice, SUPPORT_OPEN, SUPPORT_CLOSE) + CoverDevice, SUPPORT_OPEN, SUPPORT_CLOSE, SUPPORT_SET_POSITION) from homeassistant.components.lutron_caseta import ( LUTRON_CASETA_SMARTBRIDGE, LutronCasetaDevice) - _LOGGER = logging.getLogger(__name__) DEPENDENCIES = ['lutron_caseta'] @@ -38,13 +37,18 @@ class LutronCasetaCover(LutronCasetaDevice, CoverDevice): @property def supported_features(self): """Flag supported features.""" - return SUPPORT_OPEN | SUPPORT_CLOSE + return SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION @property def is_closed(self): """Return if the cover is closed.""" return self._state["current_state"] < 1 + @property + def current_cover_position(self): + """Return the current position of cover.""" + return self._state["current_state"] + def close_cover(self): """Close the cover.""" self._smartbridge.set_value(self._device_id, 0)