mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add missing is_closed property to powerview tilt only entities (#113792)
* add tilt closed * add current positioning
This commit is contained in:
parent
205c457a77
commit
7d9fa64a66
@ -520,6 +520,22 @@ class PowerViewShadeTiltOnly(PowerViewShadeWithTiltBase):
|
|||||||
self._attr_supported_features |= CoverEntityFeature.STOP_TILT
|
self._attr_supported_features |= CoverEntityFeature.STOP_TILT
|
||||||
self._max_tilt = self._shade.shade_limits.tilt_max
|
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):
|
class PowerViewShadeTopDown(PowerViewShadeBase):
|
||||||
"""Representation of a shade that lowers from the roof to the floor.
|
"""Representation of a shade that lowers from the roof to the floor.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user