mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-28 03:41:57 +01:00
Update automations.rst (#2002)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
564aa0d9f4
commit
2d5d7d9cf2
@ -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>`.
|
||||
|
Loading…
Reference in New Issue
Block a user