mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
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:
parent
322d8c2dd5
commit
ec478ab848
@ -1,12 +1,6 @@
|
|||||||
"""Support for IKEA Tradfri covers."""
|
"""Support for IKEA Tradfri covers."""
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import CoverDevice, ATTR_POSITION
|
||||||
CoverDevice,
|
|
||||||
ATTR_POSITION,
|
|
||||||
SUPPORT_OPEN,
|
|
||||||
SUPPORT_CLOSE,
|
|
||||||
SUPPORT_SET_POSITION,
|
|
||||||
)
|
|
||||||
from .base_class import TradfriBaseDevice
|
from .base_class import TradfriBaseDevice
|
||||||
from .const import KEY_GATEWAY, KEY_API, CONF_GATEWAY_ID
|
from .const import KEY_GATEWAY, KEY_API, CONF_GATEWAY_ID
|
||||||
|
|
||||||
@ -34,11 +28,6 @@ class TradfriCover(TradfriBaseDevice, CoverDevice):
|
|||||||
|
|
||||||
self._refresh(device)
|
self._refresh(device)
|
||||||
|
|
||||||
@property
|
|
||||||
def supported_features(self):
|
|
||||||
"""Flag supported features."""
|
|
||||||
return SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_cover_position(self):
|
def current_cover_position(self):
|
||||||
"""Return current position of cover.
|
"""Return current position of cover.
|
||||||
@ -59,6 +48,10 @@ class TradfriCover(TradfriBaseDevice, CoverDevice):
|
|||||||
"""Close cover."""
|
"""Close cover."""
|
||||||
await self._api(self._device_control.set_state(100))
|
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
|
@property
|
||||||
def is_closed(self):
|
def is_closed(self):
|
||||||
"""Return if the cover is closed or not."""
|
"""Return if the cover is closed or not."""
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Tradfri",
|
"name": "Tradfri",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tradfri",
|
"documentation": "https://www.home-assistant.io/integrations/tradfri",
|
||||||
"requirements": ["pytradfri[async]==6.3.1"],
|
"requirements": ["pytradfri[async]==6.4.0"],
|
||||||
"homekit": {
|
"homekit": {
|
||||||
"models": ["TRADFRI"]
|
"models": ["TRADFRI"]
|
||||||
},
|
},
|
||||||
|
@ -1612,7 +1612,7 @@ pytraccar==0.9.0
|
|||||||
pytrackr==0.0.5
|
pytrackr==0.0.5
|
||||||
|
|
||||||
# homeassistant.components.tradfri
|
# homeassistant.components.tradfri
|
||||||
pytradfri[async]==6.3.1
|
pytradfri[async]==6.4.0
|
||||||
|
|
||||||
# homeassistant.components.trafikverket_train
|
# homeassistant.components.trafikverket_train
|
||||||
# homeassistant.components.trafikverket_weatherstation
|
# homeassistant.components.trafikverket_weatherstation
|
||||||
|
@ -534,7 +534,7 @@ python_awair==0.0.4
|
|||||||
pytraccar==0.9.0
|
pytraccar==0.9.0
|
||||||
|
|
||||||
# homeassistant.components.tradfri
|
# homeassistant.components.tradfri
|
||||||
pytradfri[async]==6.3.1
|
pytradfri[async]==6.4.0
|
||||||
|
|
||||||
# homeassistant.components.vesync
|
# homeassistant.components.vesync
|
||||||
pyvesync==1.1.0
|
pyvesync==1.1.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user