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:
Poltorak Serguei 2023-02-05 03:25:07 +03:00 committed by GitHub
parent e3b820d9db
commit 4a83a63b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@ class ZWaveMeCover(ZWaveMeEntity, CoverEntity):
CoverEntityFeature.OPEN
| CoverEntityFeature.CLOSE
| CoverEntityFeature.SET_POSITION
| CoverEntityFeature.STOP
)
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))}"
)
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.