mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-13 20:11:53 +01:00
Rename last_operation() to get_last_operation() & warn about bug http… (#3884)
Co-authored-by: H. Árkosi Róbert <robreg@zsurob.hu>
This commit is contained in:
parent
0b889e396b
commit
3d475b3d31
@ -86,14 +86,17 @@ This can be handled at the **stop_action** by using the following lambda functio
|
||||
|
||||
stop_action:
|
||||
- lambda: !lambda |-
|
||||
if (id(cover).last_operation() == CoverOperation::COVER_OPERATION_OPENING) {
|
||||
if (id(cover).get_last_operation() == CoverOperation::COVER_OPERATION_OPENING) {
|
||||
// Cover is currently opening
|
||||
id(cover_button_down).press();
|
||||
} else if (id(cover).last_operation() == CoverOperation::COVER_OPERATION_CLOSING) {
|
||||
} else if (id(cover).get_last_operation() == CoverOperation::COVER_OPERATION_CLOSING) {
|
||||
// Cover is currently closing
|
||||
id(cover_button_up).press();
|
||||
}
|
||||
|
||||
Be aware that ``get_last_operation`` will only return the last opening or closing operation, but not the last idle operation.
|
||||
This issue is tracked `here <https://github.com/esphome/issues/issues/4252#issuecomment-2132727377>`_.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user