mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-29 04:27:32 +02:00
Docs for repeat action (#1604)
This commit is contained in:
parent
ebc6513223
commit
b6189bef9b
@ -561,6 +561,30 @@ Configuration variables:
|
||||
- **condition** (**Required**): The condition to check whether to execute. See :ref:`Conditions <config-condition>`.
|
||||
- **then** (**Required**, :ref:`config-action`): The action to perform until the condition evaluates to false.
|
||||
|
||||
.. _repeat_action:
|
||||
|
||||
``repeat`` Action
|
||||
-----------------
|
||||
|
||||
This action allows you to repeat a block a given number of times.
|
||||
For example, the automation below will flash the light five times.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- repeat:
|
||||
count: 5
|
||||
then:
|
||||
- light.turn_on: some_light
|
||||
- delay: 1s
|
||||
- light.turn_off: some_light
|
||||
- delay: 10s
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **count** (**Required**, integer): The number of times the action should be repeated.
|
||||
- **then** (**Required**, :ref:`config-action`): The action to repeat.
|
||||
|
||||
.. _wait_until_action:
|
||||
|
||||
``wait_until`` Action
|
||||
|
Loading…
Reference in New Issue
Block a user