Update time_based.rst

- fixed typo and property name
This commit is contained in:
Nico Peter 2024-05-06 09:00:44 +02:00 committed by GitHub
parent 8143158399
commit 5fc1b056ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -80,16 +80,16 @@ Configuration variables:
Handle stop_action: Handle stop_action:
------------------------ ------------------------
For some cover controllers, separate switches for UP and DOWN action are used while a stop is issued when sending a counter command. For some cover controllers, separate switches for UP and DOWN action are used while a stop is issued when sending a counter command.
This can be handled at the **stop_action** by using the folling lamda function: This can be handled at the **stop_action** by using the following lamda function:
.. code-block:: yaml .. code-block:: yaml
stop_action: stop_action:
- lambda: !lambda |- - 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 // Cover is currently opening
id(cover_button_down).press(); 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 // Cover is currently closing
id(cover_button_up).press(); id(cover_button_up).press();
} }