diff --git a/components/cover/time_based.rst b/components/cover/time_based.rst index 0f5e542dd..e5a5150e9 100644 --- a/components/cover/time_based.rst +++ b/components/cover/time_based.rst @@ -77,7 +77,22 @@ Configuration variables: ``esp8266_restore_from_flash: true`` option set. See :doc:`esp8266_restore_from_flash ` for details. +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. +This can be handled at the **stop_action** by using the folling lamda function: +.. code-block:: yaml + + stop_action: + - lambda: !lambda |- + if (id(cover).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) { + // Cover is currently closing + id(cover_button_up).press(); + } See Also -------- diff --git a/components/external_components.rst b/components/external_components.rst index 32a89747b..d24482171 100644 --- a/components/external_components.rst +++ b/components/external_components.rst @@ -46,6 +46,7 @@ Configuration variables: - **ref** (*Optional*, string): Git ref (branch or tag). If not specified the default branch is used. - **username** (*Optional*, string): Username for the Git server, if one is required - **password** (*Optional*, string): Password for the Git server, if one is required + - **path** (*Optional*, string): Path inside the repo, if different from ``components`` or ``esphome/components`` local options: diff --git a/web-api/index.rst b/web-api/index.rst index 026c7bda6..96e6f793a 100644 --- a/web-api/index.rst +++ b/web-api/index.rst @@ -182,7 +182,7 @@ creating a POST request at ``/light//turn_on?brightness=128&transition=2`` w - **flash**: Flash the color provided by the other properties for a duration in seconds. - **transition**: Transition to the specified color values in this duration in seconds. - **effect**: Set an effect for the light. -- ***color_temp***: Set the color temperature of the light, in mireds. +- **color_temp**: Set the color temperature of the light, in mireds. ``turn_off`` optional URL parameters: @@ -239,9 +239,10 @@ stopped midway. An example GET request for ``/cover/front_window_blinds`` might - **id**: The ID of the cover, prefixed with ``cover-``. - **state**: ``OPEN`` or ``CLOSED``. Any position other than 0.0 is considered open. -- **value**: Current cover position as a float number. +- **value**: Current cover position as a float number. If the cover component does not support cover position reporting, then this will either be 1.0 when open or 0.0 when closed. - **current_operation**: ``OPENING``, ``CLOSING`` or ``IDLE``. - **tilt**: (only if supported by this cover component) tilt angle from 0.0 to 1.0. +- **position**: (only if supported by this cover component) Current cover position as a float number. POST requests on the other hand allow performing actions on the cover, the available methods being ``open``, ``close``, ``stop``, ``toggle`` and ``set``. The following parameters