Update automations.rst (#2002)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
sevorl 2022-05-10 23:38:07 +02:00 committed by GitHub
parent 564aa0d9f4
commit 2d5d7d9cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -610,6 +610,20 @@ a shorthand way of writing a ``while`` action with an empty ``then`` block.)
binary_sensor.is_on: some_binary_sensor
- logger.log: "Binary sensor is ready"
If you want to use a timeout, the term "condition" is required:
.. code-block:: yaml
# In a trigger:
on_...:
- logger.log: "Waiting for binary sensor"
- wait_until:
condition:
binary_sensor.is_on: some_binary_sensor
timeout: 8s
- logger.log: "Binary sensor might be ready"
Configuration variables:
- **condition** (**Required**): The condition to wait to become true. See :ref:`Conditions <config-condition>`.