From 2d5d7d9cf255fb1e9eee9358b415a69f181e79e9 Mon Sep 17 00:00:00 2001 From: sevorl <81764300+sevorl@users.noreply.github.com> Date: Tue, 10 May 2022 23:38:07 +0200 Subject: [PATCH] Update automations.rst (#2002) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- guides/automations.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/guides/automations.rst b/guides/automations.rst index 2131539aa..aa5df3c59 100644 --- a/guides/automations.rst +++ b/guides/automations.rst @@ -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 `.