From 8e196fbe0619f854ba916599cc18992ba9d9cdf4 Mon Sep 17 00:00:00 2001 From: niobos Date: Wed, 26 Oct 2022 08:03:53 +0200 Subject: [PATCH] Add Velbus cover opening/closing (#79851) * Velbus cover/blind: indicate opening/closing * Add docstrings because flake8 requirement Co-authored-by: Niels Laukens --- homeassistant/components/velbus/cover.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/velbus/cover.py b/homeassistant/components/velbus/cover.py index 782d8d3c81b..009c4fadfb9 100644 --- a/homeassistant/components/velbus/cover.py +++ b/homeassistant/components/velbus/cover.py @@ -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.