Skip to content

Commit 5343bcd

Browse files
committed
updated task.wait_until() description of state_hold_false; fixes #115
1 parent 9dfa312 commit 5343bcd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/reference.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -970,11 +970,10 @@ It takes the following keyword arguments (all are optional):
970970
before a subsequent state trigger occurs. The default value of ``None`` means that the trigger can
971971
occur without the trigger expression having to be ``False``. A value of ``0`` requires the
972972
expression become ``False`` before the trigger, but with no minimum time in that state.
973-
With the default of ``state_check_now=True``, the state trigger expression is checked at startup,
974-
and if ``True`` the trigger will not occur, and a wait for the next ``False`` will begin.
975-
If ``state_check_now==False``, the ``state_hold_false`` period applies at startup, although the
976-
expression is not checked at startup. So if ``state_hold_false=0`` the first trigger after startup
977-
will succeed, whether or not the expression was previously ``False``.
973+
When ``state_hold_false`` is set, the state trigger expression is evaluated immediately. If ``False``
974+
the ``state_hold_false`` period begins. If ``True``, a wait for the next ``False`` value begins.
975+
If ``state_check_now`` is also set, ``task.wait_until()`` will still return immediately if the
976+
expression is initially ``True``.
978977

979978
When a trigger occurs, the return value is a ``dict`` containing the same keyword values that are
980979
passed into the function when the corresponding decorator trigger occurs. There will always be a key

0 commit comments

Comments
 (0)