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>pull/80994/head
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…
Reference in New Issue