mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add Velbus cover opening/closing (#79851)
* Velbus cover/blind: indicate opening/closing * Add docstrings because flake8 requirement Co-authored-by: Niels Laukens <niels@dest-unreach.be>
This commit is contained in:
parent
8b119ab5fc
commit
8e196fbe06
@ -38,7 +38,7 @@ class VelbusCover(VelbusEntity, CoverEntity):
|
||||
_channel: VelbusBlind
|
||||
|
||||
def __init__(self, channel: VelbusBlind) -> None:
|
||||
"""Initialize the dimmer."""
|
||||
"""Initialize the cover."""
|
||||
super().__init__(channel)
|
||||
if self._channel.support_position():
|
||||
self._attr_supported_features = (
|
||||
@ -59,6 +59,16 @@ class VelbusCover(VelbusEntity, CoverEntity):
|
||||
"""Return if the cover is closed."""
|
||||
return self._channel.is_closed()
|
||||
|
||||
@property
|
||||
def is_opening(self) -> bool:
|
||||
"""Return if the cover is opening."""
|
||||
return self._channel.is_opening()
|
||||
|
||||
@property
|
||||
def is_closing(self) -> bool:
|
||||
"""Return if the cover is closing."""
|
||||
return self._channel.is_closing()
|
||||
|
||||
@property
|
||||
def current_cover_position(self) -> int | None:
|
||||
"""Return current position of cover.
|
||||
|
Loading…
x
Reference in New Issue
Block a user