mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Explicitly return None in Velux covers (#45596)
This commit is contained in:
parent
491e66793e
commit
26e266181d
@ -96,6 +96,7 @@ class VeluxCover(CoverEntity):
|
|||||||
"""Return the current position of the cover."""
|
"""Return the current position of the cover."""
|
||||||
if isinstance(self.node, Blind):
|
if isinstance(self.node, Blind):
|
||||||
return 100 - self.node.orientation.position_percent
|
return 100 - self.node.orientation.position_percent
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
@ -154,9 +155,8 @@ class VeluxCover(CoverEntity):
|
|||||||
|
|
||||||
async def async_set_cover_tilt_position(self, **kwargs):
|
async def async_set_cover_tilt_position(self, **kwargs):
|
||||||
"""Move cover tilt to a specific position."""
|
"""Move cover tilt to a specific position."""
|
||||||
if ATTR_TILT_POSITION in kwargs:
|
position_percent = 100 - kwargs[ATTR_TILT_POSITION]
|
||||||
position_percent = 100 - kwargs[ATTR_TILT_POSITION]
|
orientation = Position(position_percent=position_percent)
|
||||||
orientation = Position(position_percent=position_percent)
|
await self.node.set_orientation(
|
||||||
await self.node.set_orientation(
|
orientation=orientation, wait_for_completion=False
|
||||||
orientation=orientation, wait_for_completion=False
|
)
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user