1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-10 22:03:46 +01:00

Add supports_stop trait to Cover (#3897)

* Add "stop" trait to Cover

* Add `supports_stop` to Cover protobuf msg

* Run `script/api_protobuf/api_protobuf.py`

... followed by `script/clang-format -i`

* Add `has_stop` field to template Cover

* Set `has_stop` during Cover codegen

* Set `supports_stop` trait on all other Cover types

* Bump APIVersion to 1.8

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Alexander Momchilov
2023-04-23 16:51:32 -04:00
committed by GitHub
parent 0a95f116fc
commit bef5b38d49
16 changed files with 28 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ cover::CoverTraits CopyCover::get_traits() {
// copy traits manually so it doesn't break when new options are added
// but the control() method hasn't implemented them yet.
traits.set_is_assumed_state(base.get_is_assumed_state());
traits.set_supports_stop(base.get_supports_stop());
traits.set_supports_position(base.get_supports_position());
traits.set_supports_tilt(base.get_supports_tilt());
traits.set_supports_toggle(base.get_supports_toggle());