Add stop feature to tradfri covers (#28180)

* Tradfri cover enhancements

* tradfri dependency update

* Revert addition of battery attrubite

* Remove the supported_features property

* Remove unwanted file
This commit is contained in:
Joakim Sørensen 2019-10-24 22:38:24 +02:00 committed by Paulus Schoutsen
parent 322d8c2dd5
commit ec478ab848
4 changed files with 8 additions and 15 deletions

View File

@ -1,12 +1,6 @@
"""Support for IKEA Tradfri covers."""
from homeassistant.components.cover import (
CoverDevice,
ATTR_POSITION,
SUPPORT_OPEN,
SUPPORT_CLOSE,
SUPPORT_SET_POSITION,
)
from homeassistant.components.cover import CoverDevice, ATTR_POSITION
from .base_class import TradfriBaseDevice
from .const import KEY_GATEWAY, KEY_API, CONF_GATEWAY_ID
@ -34,11 +28,6 @@ class TradfriCover(TradfriBaseDevice, CoverDevice):
self._refresh(device)
@property
def supported_features(self):
"""Flag supported features."""
return SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION
@property
def current_cover_position(self):
"""Return current position of cover.
@ -59,6 +48,10 @@ class TradfriCover(TradfriBaseDevice, CoverDevice):
"""Close cover."""
await self._api(self._device_control.set_state(100))
async def async_stop_cover(self, **kwargs):
"""Close cover."""
await self._api(self._device_control.trigger_blind())
@property
def is_closed(self):
"""Return if the cover is closed or not."""

View File

@ -3,7 +3,7 @@
"name": "Tradfri",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tradfri",
"requirements": ["pytradfri[async]==6.3.1"],
"requirements": ["pytradfri[async]==6.4.0"],
"homekit": {
"models": ["TRADFRI"]
},

View File

@ -1612,7 +1612,7 @@ pytraccar==0.9.0
pytrackr==0.0.5
# homeassistant.components.tradfri
pytradfri[async]==6.3.1
pytradfri[async]==6.4.0
# homeassistant.components.trafikverket_train
# homeassistant.components.trafikverket_weatherstation

View File

@ -534,7 +534,7 @@ python_awair==0.0.4
pytraccar==0.9.0
# homeassistant.components.tradfri
pytradfri[async]==6.3.1
pytradfri[async]==6.4.0
# homeassistant.components.vesync
pyvesync==1.1.0