Add is_opening and is_closing properties to VeluxCover (#127038)

This commit is contained in:
Jan Schneider 2024-09-30 11:46:47 +02:00 committed by GitHub
parent dce51b02c8
commit ebe4ed99b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,6 +95,16 @@ class VeluxCover(VeluxEntity, CoverEntity):
"""Return if the cover is closed.""" """Return if the cover is closed."""
return self.node.position.closed return self.node.position.closed
@property
def is_opening(self) -> bool:
"""Return if the cover is opening or not."""
return self.node.is_opening
@property
def is_closing(self) -> bool:
"""Return if the cover is closing or not."""
return self.node.is_closing
async def async_close_cover(self, **kwargs: Any) -> None: async def async_close_cover(self, **kwargs: Any) -> None:
"""Close the cover.""" """Close the cover."""
await self.node.close(wait_for_completion=False) await self.node.close(wait_for_completion=False)