mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Small fix in velbus cover for the assumed states (#121656)
This commit is contained in:
parent
6702d232e2
commit
33df857283
@ -66,12 +66,16 @@ class VelbusCover(VelbusEntity, CoverEntity):
|
|||||||
@property
|
@property
|
||||||
def is_opening(self) -> bool:
|
def is_opening(self) -> bool:
|
||||||
"""Return if the cover is opening."""
|
"""Return if the cover is opening."""
|
||||||
return self._channel.is_opening()
|
if opening := self._channel.is_opening():
|
||||||
|
self._assumed_closed = False
|
||||||
|
return opening
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_closing(self) -> bool:
|
def is_closing(self) -> bool:
|
||||||
"""Return if the cover is closing."""
|
"""Return if the cover is closing."""
|
||||||
return self._channel.is_closing()
|
if closing := self._channel.is_closing():
|
||||||
|
self._assumed_closed = True
|
||||||
|
return closing
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_cover_position(self) -> int | None:
|
def current_cover_position(self) -> int | None:
|
||||||
@ -89,13 +93,11 @@ class VelbusCover(VelbusEntity, CoverEntity):
|
|||||||
async def async_open_cover(self, **kwargs: Any) -> None:
|
async def async_open_cover(self, **kwargs: Any) -> None:
|
||||||
"""Open the cover."""
|
"""Open the cover."""
|
||||||
await self._channel.open()
|
await self._channel.open()
|
||||||
self._assumed_closed = False
|
|
||||||
|
|
||||||
@api_call
|
@api_call
|
||||||
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._channel.close()
|
await self._channel.close()
|
||||||
self._assumed_closed = True
|
|
||||||
|
|
||||||
@api_call
|
@api_call
|
||||||
async def async_stop_cover(self, **kwargs: Any) -> None:
|
async def async_stop_cover(self, **kwargs: Any) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user