Skip to content

Commit

Permalink
Add Z-Wave.Me cover stop command (home-assistant#87428)
Browse files Browse the repository at this point in the history
* Add stop command to cover

* Add type annotation

---------

Co-authored-by: Martin Hjelmare <[email protected]>
  • Loading branch information
PoltoS and MartinHjelmare authored Feb 5, 2023
1 parent e3b820d commit 4a83a63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions homeassistant/components/zwave_me/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ZWaveMeCover(ZWaveMeEntity, CoverEntity):
CoverEntityFeature.OPEN
| CoverEntityFeature.CLOSE
| CoverEntityFeature.SET_POSITION
| CoverEntityFeature.STOP
)

def close_cover(self, **kwargs: Any) -> None:
Expand All @@ -68,6 +69,10 @@ def set_cover_position(self, **kwargs: Any) -> None:
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
def current_cover_position(self) -> int | None:
"""Return current position of cover.
Expand Down

0 comments on commit 4a83a63

Please sign in to comment.