mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add Z-Wave.Me cover stop command (#87428)
* Add stop command to cover * Add type annotation --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
e3b820d9db
commit
4a83a63b32
@ -51,6 +51,7 @@ class ZWaveMeCover(ZWaveMeEntity, CoverEntity):
|
|||||||
CoverEntityFeature.OPEN
|
CoverEntityFeature.OPEN
|
||||||
| CoverEntityFeature.CLOSE
|
| CoverEntityFeature.CLOSE
|
||||||
| CoverEntityFeature.SET_POSITION
|
| CoverEntityFeature.SET_POSITION
|
||||||
|
| CoverEntityFeature.STOP
|
||||||
)
|
)
|
||||||
|
|
||||||
def close_cover(self, **kwargs: Any) -> None:
|
def close_cover(self, **kwargs: Any) -> None:
|
||||||
@ -68,6 +69,10 @@ class ZWaveMeCover(ZWaveMeEntity, CoverEntity):
|
|||||||
self.device.id, f"exact?level={str(min(value, 99))}"
|
self.device.id, f"exact?level={str(min(value, 99))}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def stop_cover(self, **kwargs: Any) -> None:
|
||||||
|
"""Stop cover."""
|
||||||
|
self.controller.zwave_api.send_command(self.device.id, "stop")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_cover_position(self) -> int | None:
|
def current_cover_position(self) -> int | None:
|
||||||
"""Return current position of cover.
|
"""Return current position of cover.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user