From 7d9fa64a66e676f3fcc6fb82cc150ca0ddd22950 Mon Sep 17 00:00:00 2001 From: kingy444 Date: Sat, 23 Mar 2024 06:34:00 +1100 Subject: [PATCH] Add missing is_closed property to powerview tilt only entities (#113792) * add tilt closed * add current positioning --- .../components/hunterdouglas_powerview/cover.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/homeassistant/components/hunterdouglas_powerview/cover.py b/homeassistant/components/hunterdouglas_powerview/cover.py index a3919aefd7c..ebf636c3ff6 100644 --- a/homeassistant/components/hunterdouglas_powerview/cover.py +++ b/homeassistant/components/hunterdouglas_powerview/cover.py @@ -520,6 +520,22 @@ class PowerViewShadeTiltOnly(PowerViewShadeWithTiltBase): self._attr_supported_features |= CoverEntityFeature.STOP_TILT self._max_tilt = self._shade.shade_limits.tilt_max + @property + def current_cover_position(self) -> int: + """Return the current position of cover.""" + # allows using parent class with no other alterations + return CLOSED_POSITION + + @property + def transition_steps(self) -> int: + """Return the steps to make a move.""" + return self.positions.tilt + + @property + def is_closed(self) -> bool: + """Return if the cover is closed.""" + return self.positions.tilt <= CLOSED_POSITION + class PowerViewShadeTopDown(PowerViewShadeBase): """Representation of a shade that lowers from the roof to the floor.